llvm-project/llvm/unittests/IR
Nikita Popov 90ec6dff86 [OpaquePtr] Forbid mixing typed and opaque pointers
Currently, opaque pointers are supported in two forms: The
-force-opaque-pointers mode, where all pointers are opaque and
typed pointers do not exist. And as a simple ptr type that can
coexist with typed pointers.

This patch removes support for the mixed mode. You either get
typed pointers, or you get opaque pointers, but not both. In the
(current) default mode, using ptr is forbidden. In -opaque-pointers
mode, all pointers are opaque.

The motivation here is that the mixed mode introduces additional
issues that don't exist in fully opaque mode. D105155 is an example
of a design problem. Looking at D109259, it would probably need
additional work to support mixed mode (e.g. to generate GEPs for
typed base but opaque result). Mixed mode will also end up
inserting many casts between i8* and ptr, which would require
significant additional work to consistently avoid.

I don't think the mixed mode is particularly valuable, as it
doesn't align with our end goal. The only thing I've found it to
be moderately useful for is adding some opaque pointer tests in
between typed pointer tests, but I think we can live without that.

Differential Revision: https://reviews.llvm.org/D109290
2021-09-10 15:18:23 +02:00
..
AbstractCallSiteTest.cpp
AsmWriterTest.cpp
AttributesTest.cpp [NFC] Cleanup AttributeList::getStackAlignment() 2021-08-19 14:21:40 -07:00
BasicBlockTest.cpp [RGT] Recode more unreachable assertions and tautologies 2021-03-19 09:17:22 -07:00
CFGBuilder.cpp Switch from llvm::is_trivially_copyable to std::is_trivially_copyable 2020-12-02 22:02:48 -08:00
CFGBuilder.h
CMakeLists.txt [NFC] Add missing dependency in the IR unittests 2020-11-18 10:10:44 +00:00
ConstantRangeTest.cpp [APInt] Normalize naming on keep constructors / predicate methods. 2021-09-09 09:50:24 -07:00
ConstantsTest.cpp Reapply [ConstantFold] Fold more operations to poison 2021-05-13 16:04:12 +02:00
DataLayoutTest.cpp Add a default address space for globals to DataLayout 2020-11-20 15:46:52 +00:00
DebugInfoTest.cpp [DebugInfo][unittest] Fix heap-use-after-free after D76115 2021-03-29 23:31:14 -07:00
DebugTypeODRUniquingTest.cpp Reland [DebugInfo] generate btf_tag annotations for DIComposite types 2021-08-19 17:33:50 -07:00
DemandedBitsTest.cpp [DemandedBits] Improve accuracy of Add propagator 2020-08-17 12:54:09 +01:00
DominatorTreeBatchUpdatesTest.cpp
DominatorTreeTest.cpp [DomTree] Accept Value as Def (NFC) 2020-10-22 18:32:03 +02:00
FunctionTest.cpp
IRBuilderTest.cpp [NFC] Rename AttributeList::getParam/Ret/FnAttributes() -> get*Attributes() 2021-08-13 11:16:52 -07:00
InstructionsTest.cpp [NFC] More get/removeAttribute() cleanup 2021-08-17 21:05:41 -07:00
IntrinsicsTest.cpp
LegacyPassManagerTest.cpp
MDBuilderTest.cpp
ManglerTest.cpp
MetadataTest.cpp [DebugInfo] generate btf_tag annotations for func parameters 2021-08-26 14:18:30 -07:00
ModuleTest.cpp
PassBuilderCallbacksTest.cpp Clean up uses of gmock Invoke in an attempt to make it work with GCC 6.2. NFCI. 2021-05-17 13:48:45 +02:00
PassManagerTest.cpp [NewPM] Hide pass manager debug logging behind -debug-pass-manager-verbose 2021-05-07 21:51:47 -07:00
PatternMatch.cpp [APInt] Normalize naming on keep constructors / predicate methods. 2021-09-09 09:50:24 -07:00
TimePassesTest.cpp [NewPM][PassInstrumentation] Add PreservedAnalyses parameter to AfterPass* callbacks 2020-08-21 16:10:42 +07:00
TypesTest.cpp [OpaquePtr] Forbid mixing typed and opaque pointers 2021-09-10 15:18:23 +02:00
UseTest.cpp
UserTest.cpp
VPIntrinsicTest.cpp [VP] Declaration and docs for vp.select intrinsic 2021-09-02 11:17:14 +02:00
ValueHandleTest.cpp Fixup Asserts+!AbiBreakingChecks fallout from db33f85c71 2021-01-07 14:18:19 -08:00
ValueMapTest.cpp Put back the trailing commas on TYPED_TEST_SUITE 2021-05-17 14:14:13 +02:00
ValueTest.cpp The maximal representable alignment in LLVM IR is 1GiB, not 512MiB 2021-08-26 12:53:39 +03:00
VectorTypesTest.cpp [SVE] Remove reliance on TypeSize comparison operators in unit tests 2020-10-21 08:05:55 +01:00
VerifierTest.cpp [NFC] Cleanup more AttributeList::addAttribute() 2021-08-17 21:05:41 -07:00