@@ -38,20 +38,20 @@ These Options are initialized in a private static member for the passes.
38
38
39
39
### Special attributes for parsed functions
40
40
> [ !WARNING]
41
- When performing optimizations with the new pass builder system the
42
- TargetLibraryInfo (Internal LLVM concept) is used to determine what the "built-in"
43
- functions are. Unfortunately, they leave little room for manipulating or customizing
44
- this set (In C++ there is some "wiggle room", in LLVM-C there is NO support for
45
- this type at all!). Unfortunately, that means that if any function happens to have
46
- the same name as the TargetLibraryInfo for a given Triple then it will be optimized
47
- AS a built-in function (even if not declared as one) unless explicitly declared as
48
- "not" at the call site with an attribute. This is an unfortunate state
49
- of affairs with the LLVM support for C++ and highly problematic for ` C ` based
50
- bindings/projections like this library. Fortunately, there is a scapegoat for this.
51
- The function can include a ` nobuiltin ` attribute at the call site to prevent the
52
- optimizer from assuming the call is to one of the well known built-in functions.
53
- This isn't used for Kaleidoscope. But does leave room for problems with names that
54
- match some arbitrary set of "built-in" symbols.
41
+ > When performing optimizations with the new pass builder system the
42
+ > TargetLibraryInfo (Internal LLVM concept) is used to determine what the "built-in"
43
+ > functions are. Unfortunately, they leave little room for manipulating or customizing
44
+ > this set (In C++ there is some "wiggle room", in LLVM-C there is NO support for
45
+ > this type at all!). Unfortunately, that means that if any function happens to have
46
+ > the same name as the TargetLibraryInfo for a given Triple then it will be optimized
47
+ > AS a built-in function (even if not declared as one) unless explicitly declared as
48
+ > "not" at the call site with an attribute. This is an unfortunate state
49
+ > of affairs with the LLVM support for C++ and highly problematic for ` C ` based
50
+ > bindings/projections like this library. Fortunately, there is a scapegoat for this.
51
+ > The function can include a ` nobuiltin ` attribute at the call site to prevent the
52
+ > optimizer from assuming the call is to one of the well known built-in functions.
53
+ > This isn't used for Kaleidoscope. But does leave room for problems with names that
54
+ > match some arbitrary set of "built-in" symbols.
55
55
56
56
[ !code-csharp[ Main] ( CodeGenerator.cs#GetOrDeclareFunction )]
57
57
0 commit comments