DirectXShaderCompiler/lib/IR
David Neto ffee5dcbe9
Use a real instruction for the sentinel in the Instruction intrusive … (#6762)
…list

Instructions in a BasicBlock are maintained in a doubly-linked list. The
links are "instrusive" in the sense that with inheritance tricks the
Next and Prev nodes are embedded in the Instruction object itself.

The linked list uses a sentinel object to mark the tail of the list.

Previously, the sentinel was an ilist_half_node<Instruction> which just
consists of a 'Instruction* Prev', but then it was cast to Instruction*.
This is flagged by the undefined behaviour sanitizer in some cases.
Also, it's weird and wrong.

Upstream LLVM has entirely reimplimented the intrusive list to avoid
such problems. But that's a massive change.

This change uses a real Instruction object as the sentinel. The
instruction is only used for its Next and Prev properties. I used an
UnreachableInst becuase it's small and simple.

Issue: #6446
2024-07-11 18:10:20 -04:00
..
AsmWriter.cpp Fixed SlotTracker slowness bug (#4197) 2022-01-20 12:17:49 -08:00
AttributeImpl.h Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Attributes.cpp Cleanup part of compiling warnings (#2903) 2020-06-25 02:57:41 -06:00
AutoUpgrade.cpp [linux-port] Evade unused in LLVM code (#1327) 2018-06-05 14:07:51 -04:00
BasicBlock.cpp Use a real instruction for the sentinel in the Instruction intrusive … (#6762) 2024-07-11 18:10:20 -04:00
CMakeLists.txt Conditionalize dxilconv pass inclusion in opt (#4034) 2021-10-25 14:20:16 -05:00
Comdat.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
ConstantFold.cpp Move HLSL shift behavior to frontend (#4643) 2022-12-10 11:42:48 -06:00
ConstantFold.h Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
ConstantRange.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Constants.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
ConstantsContext.h Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Core.cpp [linux-port] Introduce Windows "adapter" headers (#1314) 2018-06-17 11:31:21 -04:00
DIBuilder.cpp Fix input vectors not having debug info (#2038) 2019-03-15 14:29:02 -07:00
DataLayout.cpp Convert more mallocs/frees to news/deletes (#2157) 2019-05-07 07:46:09 -07:00
DebugInfo.cpp Internal validator error messages don't need /Zi anymore. (#3606) 2021-03-20 19:21:26 -07:00
DebugInfoMetadata.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
DebugLoc.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
DiagnosticInfo.cpp Fixed an assert when a dxil error happens with global variable (#3974) 2021-09-28 10:09:28 -07:00
DiagnosticPrinter.cpp [linux-port] Fix DiagnosticPrinter use of std::hex (#1298) 2018-05-22 11:19:28 -04:00
Dominators.cpp Add support for custom allocators (#390) 2017-07-06 16:45:48 -07:00
Function.cpp [NFC] Remove SAL annotations from internal APIs (#5639) 2023-09-14 08:59:49 -05:00
GCOV.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
GVMaterializer.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Globals.cpp Fix remaining HLModule/DxilModule dependencies from llvm::Module, etc. (#1656) 2018-11-01 16:38:33 -07:00
IRBuilder.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
IRPrintingPasses.cpp Conditionalize dxilconv pass inclusion in opt (#4034) 2021-10-25 14:20:16 -05:00
InlineAsm.cpp Fallthrough (#4843) 2022-12-09 10:13:56 -08:00
Instruction.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Instructions.cpp misc: fix clang warnings: deprecated,bitwise-logic (#4776) 2022-11-16 19:52:09 +01:00
IntrinsicInst.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
LLVMBuild.txt Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
LLVMContext.cpp Fixed issues that change codegen when there's debug info. (#2190) 2019-05-17 13:35:08 -07:00
LLVMContextImpl.cpp Add support for custom allocators (#390) 2017-07-06 16:45:48 -07:00
LLVMContextImpl.h Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
LegacyPassManager.cpp Add `-print-before` and `-print-before-all` flags (#5590) 2023-08-25 14:15:00 -07:00
MDBuilder.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Mangler.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Metadata.cpp Fixed issues that change codegen when there's debug info. (#2190) 2019-05-17 13:35:08 -07:00
MetadataImpl.h Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
MetadataTracking.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Module.cpp Optimized bitcode loading. Added function to only materialize named MD. (#2854) 2020-04-28 14:04:19 -07:00
Operator.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Pass.cpp Change getPassName return type to StringRef. (#4247) 2022-02-10 14:14:43 -08:00
PassManager.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
PassRegistry.cpp [linux-port] Enable some code. Disable some code. (#1372) 2018-06-25 20:15:54 -04:00
Statepoint.cpp Remove 'using namespace std' to fix __noop ambiguity with latest libc++ (#5406) 2023-07-18 11:05:07 -04:00
SymbolTableListTraitsImpl.h Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Type.cpp [NFC] Remove SAL annotations from internal APIs (#5639) 2023-09-14 08:59:49 -05:00
TypeFinder.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Use.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
User.cpp Add support for custom allocators (#390) 2017-07-06 16:45:48 -07:00
Value.cpp Add a new WeakVH value handle; NFC (#6703) 2024-06-21 11:55:24 -07:00
ValueSymbolTable.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
ValueTypes.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Verifier.cpp Conditionalize breaks to keep them in loops (#2795) 2020-03-30 19:02:04 -07:00
module.modulemap first commit 2016-12-28 11:52:27 -08:00