ldc/gen/inlineir.h
Johan Engelen 9955d8e4e4 For LDC_inline_ir functions: instantiate a new "alwaysinline" function for each call, which is the current behavior for inline ASM too.
When certain attributes are applied to the calling function, like "unsafe-fp-math", the inlined inlineIR function has to have the same attributes otherwise the calling function attribute will be reset to the safe merge of the two: "false". Because the same inlineIR function can be called in different functions using an alias definition, a new function (with possibly different attributes) has to be instantiated upon every call.

Related GH issue #1438
2016-04-21 10:16:33 +02:00

30 lines
774 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//===-- gen/irstate.h - Inline IR implementation-----------------*- C++ -*-===//
//
// LDC the LLVM D compiler
//
// This file is distributed under the BSD-style LDC license. See the LICENSE
// file for details.
//
//===----------------------------------------------------------------------===//
//
// Contains the implementation for the LDC-specific LLVM inline IR feature.
//
//===----------------------------------------------------------------------===//
#ifndef LDC_GEN_INLINEIR_H
#define LDC_GEN_INLINEIR_H
#include "ddmd/arraytypes.h"
class DValue;
class FuncDeclaration;
struct Loc;
namespace llvm {
class Function;
}
DValue *DtoInlineIRExpr(Loc &loc, FuncDeclaration *fdecl,
Expressions *arguments);
#endif