llvm-6502/lib/Target/NVPTX
Rafael Espindola 670655471d Assert on duplicate registration. Don't depend on function pointer equality.
Before this patch we would assert when building llvm as multiple shared
libraries (cmake's BUILD_SHARED_LIBS). The problem was the line

if (T.AsmStreamerCtorFn == Target::createDefaultAsmStreamer)

which returns false because of -fvisibility-inlines-hidden. It is easy
to fix just this one case, but I decided to try to also make the
registration more strict. It looks like the old logic for ignoring
followup registration was just a temporary hack that outlived its
usefulness.

This patch converts the ifs to asserts, fixes the few cases that were
registering twice and makes sure all the asserts compare with null.

Thanks for Joerg for reporting the problem and reviewing the patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192803 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-16 16:21:40 +00:00
..
InstPrinter [NVPTX] Fix bug in stack code generation causes by MC conversion 2013-08-06 14:13:31 +00:00
MCTargetDesc [NVPTX] Start conversion to MC infrastructure 2013-08-06 14:13:27 +00:00
TargetInfo
cl_common_defines.h
CMakeLists.txt [NVPTX] Start conversion to MC infrastructure 2013-08-06 14:13:27 +00:00
LLVMBuild.txt
Makefile
ManagedStringPool.h Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size. 2013-07-04 01:31:24 +00:00
NVPTX.h [NVPTX] Remove unused prototypes 2013-07-22 17:04:40 +00:00
NVPTX.td [NVPTX] Start conversion to MC infrastructure 2013-08-06 14:13:27 +00:00
NVPTXAllocaHoisting.cpp ARM: implement ldrex, strex and clrex intrinsics 2013-07-16 09:46:55 +00:00
NVPTXAllocaHoisting.h
NVPTXAsmPrinter.cpp Make AsmPrinter::emitImplicitDef a virtual method so targets can emit custom comments for implicit defs 2013-10-11 12:39:36 +00:00
NVPTXAsmPrinter.h Make AsmPrinter::emitImplicitDef a virtual method so targets can emit custom comments for implicit defs 2013-10-11 12:39:36 +00:00
NVPTXFrameLowering.cpp [NVPTX] Fix bug in stack code generation causes by MC conversion 2013-08-06 14:13:31 +00:00
NVPTXFrameLowering.h
NVPTXGenericToNVVM.cpp Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size. 2013-07-04 01:31:24 +00:00
NVPTXInstrFormats.td
NVPTXInstrInfo.cpp Remove unused stdio.h includes 2013-08-18 08:29:51 +00:00
NVPTXInstrInfo.h
NVPTXInstrInfo.td [NVPTX] Add missing patterns for i1 [s,u]int_to_fp 2013-08-06 14:13:34 +00:00
NVPTXIntrinsics.td [NVPTX] Add isel patterns for [reg+offset] form of ldg/ldu. 2013-07-01 12:58:52 +00:00
NVPTXISelDAGToDAG.cpp ISelDAG: spot chain cycles involving MachineNodes 2013-09-22 08:21:56 +00:00
NVPTXISelDAGToDAG.h [NVPTX] Use approximate FP ops when unsafe-fp-math is used, and append 2013-07-22 12:18:04 +00:00
NVPTXISelLowering.cpp [NVPTX] Start conversion to MC infrastructure 2013-08-06 14:13:27 +00:00
NVPTXISelLowering.h [NVPTX] We dont use NVBuiltin anymore 2013-07-01 12:59:08 +00:00
NVPTXLowerAggrCopies.cpp
NVPTXLowerAggrCopies.h
NVPTXMCExpr.cpp [NVPTX] Start conversion to MC infrastructure 2013-08-06 14:13:27 +00:00
NVPTXMCExpr.h [NVPTX] Start conversion to MC infrastructure 2013-08-06 14:13:27 +00:00
NVPTXPrologEpilogPass.cpp [NVPTX] Re-enable support for virtual registers in the final output 2013-05-31 12:14:49 +00:00
NVPTXRegisterInfo.cpp [NVPTX] Remove i8 register class. PTX support for i8 (.b8, .u8, .s8) is rather poor and we're better off just ignoring it and letting LLVM expand all i8 ops out to i16. 2013-06-28 17:57:59 +00:00
NVPTXRegisterInfo.h Don't pass in the TargetInstrInfo into the register info object. It doesn't use it. 2013-06-19 21:59:00 +00:00
NVPTXRegisterInfo.td [NVPTX] Cut down on physical register defs 2013-07-01 12:59:06 +00:00
NVPTXSection.h
NVPTXSplitBBatBar.cpp Fix spelling intruction -> instruction. 2013-09-28 11:46:15 +00:00
NVPTXSplitBBatBar.h
NVPTXSubtarget.cpp [NVPTX] Add support for selecting CUDA vs OCL mode based on triple 2013-06-21 18:51:49 +00:00
NVPTXSubtarget.h
NVPTXTargetMachine.cpp Assert on duplicate registration. Don't depend on function pointer equality. 2013-10-16 16:21:40 +00:00
NVPTXTargetMachine.h
NVPTXTargetObjectFile.h NVPTXTargetObjectFile.h: Initialize some pointers as NULL in the constructor of NVPTXTargetObjectFile. ~NVPTXTargetObjectFile() tries to delete them. 2013-06-24 13:19:41 +00:00
NVPTXutil.cpp
NVPTXutil.h
NVPTXUtilities.cpp
NVPTXUtilities.h
NVPTXVector.td
NVVMReflect.cpp [NVPTX] Add programmatic interface to NVVMReflect pass 2013-05-20 16:42:16 +00:00