[PATCH] D18775: NFC: make AtomicOrdering an enum class

JF Bastien via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 4 16:13:36 PDT 2016


jfb created this revision.
jfb added reviewers: jyknight, reames.
jfb added a subscriber: llvm-commits.
Herald added a subscriber: jyknight.

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 and requires sychronize-with clang.

http://reviews.llvm.org/D18775

Files:
  docs/Atomics.rst
  include/llvm/CodeGen/SelectionDAGNodes.h
  include/llvm/IR/Instructions.h
  include/llvm/Target/TargetLowering.h
  lib/Analysis/AliasAnalysis.cpp
  lib/Analysis/AliasSetTracker.cpp
  lib/Analysis/MemoryDependenceAnalysis.cpp
  lib/AsmParser/LLParser.cpp
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/CodeGen/AtomicExpandPass.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/IR/AsmWriter.cpp
  lib/IR/Core.cpp
  lib/IR/Instruction.cpp
  lib/IR/Instructions.cpp
  lib/IR/Verifier.cpp
  lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
  lib/Target/AArch64/AArch64ISelLowering.cpp
  lib/Target/AArch64/AArch64InstrAtomics.td
  lib/Target/ARM/ARMISelLowering.cpp
  lib/Target/ARM/ARMInstrInfo.td
  lib/Target/CppBackend/CPPBackend.cpp
  lib/Target/PowerPC/PPCISelLowering.cpp
  lib/Target/Sparc/SparcISelLowering.cpp
  lib/Target/SystemZ/SystemZISelLowering.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/XCore/XCoreISelLowering.cpp
  lib/Transforms/IPO/GlobalOpt.cpp
  lib/Transforms/IPO/MergeFunctions.cpp
  lib/Transforms/Instrumentation/MemorySanitizer.cpp
  lib/Transforms/Instrumentation/SanitizerCoverage.cpp
  lib/Transforms/Instrumentation/ThreadSanitizer.cpp
  lib/Transforms/Scalar/EarlyCSE.cpp
  lib/Transforms/Scalar/LowerAtomic.cpp
  lib/Transforms/Utils/GlobalStatus.cpp
  unittests/Analysis/AliasAnalysisTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18775.52636.patch
Type: text/x-patch
Size: 70322 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160404/224a1058/attachment-0001.bin>


More information about the llvm-commits mailing list