summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2012-02-05 19:56:38 +0000
committerNick Lewycky <nicholas@mxc.ca>2012-02-05 19:56:38 +0000
commit52da72b12ad8d00c566a050ee924ff2c746b70f8 (patch)
tree5295def0a1a62699c80dc9b6b65f3c96aeb84ee5 /clang/lib/Frontend/CompilerInvocation.cpp
parent613d6d3b4395eae143aed9f1546a85b767d5d4c0 (diff)
downloadbcm5719-llvm-52da72b12ad8d00c566a050ee924ff2c746b70f8.tar.gz
bcm5719-llvm-52da72b12ad8d00c566a050ee924ff2c746b70f8.zip
Teach GlobalOpt to handle atomic accesses to globals.
* Most of the transforms come through intact by having each transformed load or store copy the ordering and synchronization scope of the original. * The transform that turns a global only accessed in main() into an alloca (since main is non-recursive) with a store of the initial value uses an unordered store, since it's guaranteed to be the first thing to happen in main. (Threads may have started before main (!) but they can't have the address of a function local before the point in the entry block we insert our code.) * The heap-SRoA transforms are disabled in the face of atomic operations. This can probably be improved; it seems odd to have atomic accesses to an alloca that doesn't have its address taken. AnalyzeGlobal keeps track of the strongest ordering found in any use of the global. This is more information than we need right now, but it's cheap to compute and likely to be useful. llvm-svn: 149847
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud