summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/section
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2017-01-25 21:29:48 +0000
committerJustin Lebar <jlebar@google.com>2017-01-25 21:29:48 +0000
commitb080b630b1a71c25ae2c704461c246476c177421 (patch)
tree4fa1f5e136a052d6073da0f91684c5816c2dc791 /lldb/packages/Python/lldbsuite/test/python_api/section
parent82a7868d4bb04409e9d040aef4d912635196917e (diff)
downloadbcm5719-llvm-b080b630b1a71c25ae2c704461c246476c177421.tar.gz
bcm5719-llvm-b080b630b1a71c25ae2c704461c246476c177421.zip
[CodeGen] [CUDA] Add the ability set default attrs on functions in linked modules.
Summary: Now when you ask clang to link in a bitcode module, you can tell it to set attributes on that module's functions to match what we would have set if we'd emitted those functions ourselves. This is particularly important for fast-math attributes in CUDA compilations. Each CUDA compilation links in libdevice, a bitcode library provided by nvidia as part of the CUDA distribution. Without this patch, if we have a user-function F that is compiled with -ffast-math that calls a function G from libdevice, F will have the unsafe-fp-math=true (etc.) attributes, but G will have no attributes. Since F calls G, the inliner will merge G's attributes into F's. It considers the lack of an unsafe-fp-math=true attribute on G to be tantamount to unsafe-fp-math=false, so it "merges" these by setting unsafe-fp-math=false on F. This then continues up the call graph, until every function that (transitively) calls something in libdevice gets unsafe-fp-math=false set, thus disabling fastmath in almost all CUDA code. Reviewers: echristo Subscribers: hfinkel, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D28538 llvm-svn: 293097
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/section')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud