llvm/lib/Transforms/IPO
JF Bastien b36d1a86f1 NFC: make AtomicOrdering an enum class
Summary:
In the context of http://wg21.link/lwg2445 C++ uses the concept of
'stronger' ordering but doesn't define it properly. This should be fixed
in C++17 barring a small question that's still open.

The code currently plays fast and loose with the AtomicOrdering
enum. Using an enum class is one step towards tightening things. I later
also want to tighten related enums, such as clang's
AtomicOrderingKind (which should be shared with LLVM as a 'C++ ABI'
enum).

This change touches a few lines of code which can be improved later, I'd
like to keep it as NFC for now as it's already quite complex. I have
related changes for clang.

As a follow-up I'll add:
  bool operator<(AtomicOrdering, AtomicOrdering) = delete;
  bool operator>(AtomicOrdering, AtomicOrdering) = delete;
  bool operator<=(AtomicOrdering, AtomicOrdering) = delete;
  bool operator>=(AtomicOrdering, AtomicOrdering) = delete;
This is separate so that clang and LLVM changes don't need to be in sync.

Reviewers: jyknight, reames

Subscribers: jyknight, llvm-commits

Differential Revision: http://reviews.llvm.org/D18775

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265602 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-06 21:19:33 +00:00
..
ArgumentPromotion.cpp [AA] Hoist the logic to reformulate various AA queries in terms of other 2016-03-02 15:56:53 +00:00
BarrierNoopPass.cpp
CMakeLists.txt
ConstantMerge.cpp
CrossDSOCFI.cpp
DeadArgumentElimination.cpp
ElimAvailExtern.cpp
ExtractGV.cpp
ForceFunctionAttrs.cpp
FunctionAttrs.cpp [attrs] Handle convergent CallSites. 2016-03-14 20:18:54 +00:00
FunctionImport.cpp [ThinLTO] Augment FunctionImport dump with value name to GUID map 2016-04-04 18:52:23 +00:00
GlobalDCE.cpp [IFUNC] Use GlobalIndirectSymbol when aliases and ifuncs have something similar 2016-04-05 08:47:51 +00:00
GlobalOpt.cpp NFC: make AtomicOrdering an enum class 2016-04-06 21:19:33 +00:00
InferFunctionAttrs.cpp [NVPTX] Infer __nvvm_reflect as nounwind, readnone 2016-03-31 21:29:57 +00:00
InlineAlways.cpp
Inliner.cpp Revert revisions 262636, 262643, 262679, and 262682. 2016-03-08 00:36:35 +00:00
InlineSimple.cpp Make InlineSimple's one-arg constructor explicit. NFC 2016-03-29 16:26:06 +00:00
Internalize.cpp
IPConstantPropagation.cpp
IPO.cpp
LLVMBuild.txt
LoopExtractor.cpp
LowerBitSets.cpp LowerBitSets: Move declarations to separate namespace. 2016-04-01 18:46:50 +00:00
MergeFunctions.cpp NFC: make AtomicOrdering an enum class 2016-04-06 21:19:33 +00:00
PartialInlining.cpp
PassManagerBuilder.cpp [PassManager] Make PassManagerBuilder::addExtension take an std::function, rather than a function pointer. 2016-03-30 20:39:29 +00:00
PruneEH.cpp
SampleProfile.cpp Remove llvm::getDISubprogram in favor of Function::getSubprogram 2016-03-11 02:14:16 +00:00
StripDeadPrototypes.cpp
StripSymbols.cpp
WholeProgramDevirt.cpp Silencing warnings from MSVC 2015 Update 2. All of these changes silence "C4334 '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)". NFC. 2016-03-30 21:30:00 +00:00