Splitting the pattern matching part from https://reviews.llvm.org/D41373
This includes a few additional MIRBuilder build helper templates that are instantiated in the PatternMatch unit test.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I find the naming conventions for the matchers kind of weird, but I see that they're meant to be familiar to users of the IR level matcher APIs so I suppose they at least make sense. Let's get this in and start using it.
include/llvm/CodeGen/GlobalISel/MIPatternMatch.h | ||
---|---|---|
2 | IIRC someone was saying they wanted to use this outside of GISel as well. Should this be hoisted up into CodeGen rather than being part of GISel? | |
270–274 | Remove these comments. It'll be obvious what's missing as people start using these APIs, and people can just add things as needed. |
Hey @aditya_nandakumar, this has been failing since it was committed our stage2 + modules bots. See rdar://36892215, http://lab.llvm.org:8080/green/view/Clang/job/clang-stage2-configure-Rlto/23858/:
FAILED: bin/llvm-profdata
: && /Users/buildslave/jenkins/workspace/clang-stage2-configure-Rlto/host-compiler/bin/clang++ -fno-stack-protector -fno-common -Wno-profile-instr-unprofiled -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -fmodules -fmodules-cache-path=/Users/buildslave/jenkins/workspace/clang-stage2-configure-Rlto/clang-build/Build/module.cache -fcxx-modules -gmodules -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics -flto -O2 -gline-tables-only -DNDEBUG -Wl,-search_paths_first -Wl,-headerpad_max_install_names -flto -Wl,-dead_strip -Wl,-object_path_lto,/Users/buildslave/jenkins/workspace/clang-stage2-configure-Rlto/clang-build/Build/tools/llvm-profdata/./llvm-profdata-lto.o tools/llvm-profdata/CMakeFiles/llvm-profdata.dir/llvm-profdata.cpp.o -o bin/llvm-profdata lib/libLLVMCore.a lib/libLLVMProfileData.a lib/libLLVMSupport.a lib/libLLVMCore.a lib/libLLVMBinaryFormat.a lib/libLLVMSupport.a -lz -lcurses -lm lib/libLLVMDemangle.a -Wl,-rpath,@loader_path/../lib && cd /Users/buildslave/jenkins/workspace/clang-stage2-configure-Rlto/clang-build/Build/tools/llvm-profdata && xcrun dsymutil /Users/buildslave/jenkins/workspace/clang-stage2-configure-Rlto/clang-build/Build/bin/llvm-profdata && xcrun strip -Sxl /Users/buildslave/jenkins/workspace/clang-stage2-configure-Rlto/clang-build/Build/bin/llvm-profdata
ld: Linking globals named '_ZN4llvm14MIPatternMatch6m_ICstERy': symbol multiply defined! for architecture x86_64
include/llvm/CodeGen/GlobalISel/MIPatternMatch.h | ||
---|---|---|
58 | Does this need to be static inline? |
IIRC someone was saying they wanted to use this outside of GISel as well. Should this be hoisted up into CodeGen rather than being part of GISel?