70 lines
1.6 KiB
CMake
Raw Normal View History

set(LLVM_LINK_COMPONENTS
AllTargetsAsmParsers
AllTargetsCodeGens
AllTargetsDescs
AllTargetsInfos
Analysis
BitReader
BitWriter
CodeGen
CodeGenTypes
Core
2023-04-17 00:17:45 +09:00
IPO
IRReader
MC
MIRParser
Passes
Support
Target
[Support] Move TargetParsers to new component This is a fairly large changeset, but it can be broken into a few pieces: - `llvm/Support/*TargetParser*` are all moved from the LLVM Support component into a new LLVM Component called "TargetParser". This potentially enables using tablegen to maintain this information, as is shown in https://reviews.llvm.org/D137517. This cannot currently be done, as llvm-tblgen relies on LLVM's Support component. - This also moves two files from Support which use and depend on information in the TargetParser: - `llvm/Support/Host.{h,cpp}` which contains functions for inspecting the current Host machine for info about it, primarily to support getting the host triple, but also for `-mcpu=native` support in e.g. Clang. This is fairly tightly intertwined with the information in `X86TargetParser.h`, so keeping them in the same component makes sense. - `llvm/ADT/Triple.h` and `llvm/Support/Triple.cpp`, which contains the target triple parser and representation. This is very intertwined with the Arm target parser, because the arm architecture version appears in canonical triples on arm platforms. - I moved the relevant unittests to their own directory. And so, we end up with a single component that has all the information about the following, which to me seems like a unified component: - Triples that LLVM Knows about - Architecture names and CPUs that LLVM knows about - CPU detection logic for LLVM Given this, I have also moved `RISCVISAInfo.h` into this component, as it seems to me to be part of that same set of functionality. If you get link errors in your components after this patch, you likely need to add TargetParser into LLVM_LINK_COMPONENTS in CMake. Differential Revision: https://reviews.llvm.org/D137838
2022-12-20 10:24:02 +00:00
TargetParser
TransformUtils
)
add_llvm_tool(llvm-reduce
DeltaManager.cpp
ReducerWorkItem.cpp
TestRunner.cpp
deltas/Delta.cpp
deltas/Utils.cpp
deltas/ReduceAliases.cpp
deltas/ReduceArguments.cpp
deltas/ReduceAttributes.cpp
deltas/ReduceBasicBlocks.cpp
deltas/ReduceDIMetadata.cpp
deltas/ReduceDistinctMetadata.cpp
deltas/ReduceDbgRecords.cpp
deltas/ReduceFunctionBodies.cpp
deltas/ReduceFunctions.cpp
deltas/ReduceGlobalObjects.cpp
deltas/ReduceGlobalValues.cpp
deltas/ReduceGlobalVarInitializers.cpp
deltas/ReduceGlobalVars.cpp
deltas/ReduceInstructions.cpp
deltas/ReduceInstructionFlags.cpp
deltas/ReduceInvokes.cpp
deltas/ReduceMetadata.cpp
deltas/ReduceModuleData.cpp
deltas/ReduceMemoryOperations.cpp
deltas/ReduceOperandBundles.cpp
deltas/ReduceOpcodes.cpp
deltas/ReduceSpecialGlobals.cpp
deltas/ReduceOperands.cpp
[llvm-reduce] Introduce operands-skip pass. Add a new "operands-skip" pass whose goal is to remove instructions in the middle of dependency chains. For instance: ``` %baseptr = alloca i32 %arrayidx = getelementptr i32, i32* %baseptr, i32 %idxprom store i32 42, i32* %arrayidx ``` might be reducible to ``` %baseptr = alloca i32 %arrayidx = getelementptr ... ; now dead, together with the computation of %idxprom store i32 42, i32* %baseptr ``` Other passes would either replace `%baseptr` with undef (operands, instructions) or move it to become a function argument (operands-to-args), both of which might fail the interestingness check. In principle the implementation allows operand replacement with any value or instruction in the function that passes the filter constraints (same type, dominance, "more reduced"), but is limited in this patch to values that are directly or indirectly used to compute the current operand value, motivated by the example above. Additionally, function arguments are added to the candidate set which helps reducing the number of relevant arguments mitigating a concern of too many arguments mentioned in https://reviews.llvm.org/D110274#3025013. Possible future extensions: * Instead of requiring the same type, bitcast/trunc/zext could be automatically inserted for some more flexibility. * If undef is added to the candidate set, "operands-skip"is able to produce any reduction that "operands" can do. Additional candidates might be zero and one, where the "reductive power" classification can prefer one over the other. If undefined behaviour should not be introduced, undef can be removed from the candidate set. Recommit after resolving conflict with D112651 and reusing shouldReduceOperand from D113532. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D111818
2021-11-11 18:23:27 -06:00
deltas/ReduceOperandsSkip.cpp
deltas/ReduceOperandsToArgs.cpp
deltas/ReduceInstructionsMIR.cpp
deltas/ReduceInstructionFlagsMIR.cpp
deltas/ReduceIRReferences.cpp
deltas/ReduceVirtualRegisters.cpp
deltas/ReduceRegisterMasks.cpp
deltas/ReduceRegisterDefs.cpp
deltas/ReduceRegisterUses.cpp
deltas/ReduceUsingSimplifyCFG.cpp
deltas/RunIRPasses.cpp
deltas/SimplifyInstructions.cpp
deltas/StripDebugInfo.cpp
llvm-reduce.cpp
DEPENDS
intrinsics_gen
)