summaryrefslogtreecommitdiffstats
path: root/llvm/unittests
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-exegesis][NFC] Rewrite of the YAML serialization.Guillaume Chatelet2018-09-253-18/+18
| | | | | | | | | | | | | | Summary: This is a NFC in preparation of exporting the initial registers as part of the YAML dump Reviewers: courbet Reviewed By: courbet Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D52427 llvm-svn: 342967
* [LoopUnroll] Add check to Latch's terminator in UnrollRuntimeLoopRemainderDavid Green2018-09-252-0/+77
| | | | | | | | | | | | | In this patch, I'm adding an extra check to the Latch's terminator in llvm::UnrollRuntimeLoopRemainder, similar to how it is already done in the llvm::UnrollLoop. The compiler would crash if this function is called with a malformed loop. Patch by Rodrigo Caetano Rocha! Differential Revision: https://reviews.llvm.org/D51486 llvm-svn: 342958
* [New PM][PassInstrumentation] Adding PassInstrumentation to the ↵Fedor Sergeev2018-09-211-4/+79
| | | | | | | | | | | | | | | AnalysisManager runs As a prerequisite to time-passes implementation which needs to time both passes and analyses, adding instrumentation points to the Analysis Manager. The are two functional differences between Pass and Analysis instrumentation: - the latter does not increment pass execution counter - it does not provide ability to skip execution of the corresponding analysis Reviewers: chandlerc, philip.pfaffe Differential Revision: https://reviews.llvm.org/D51275 llvm-svn: 342778
* Fix DenseSet::ConstIterator typedefsDavid Blaikie2018-09-201-0/+7
| | | | | | | | | | Fix DenseSet::ConstIterator pointer/reference typedefs to be const Patch by Brad Moody! Differential Revision: https://reviews.llvm.org/D52260 llvm-svn: 342697
* Remove an unused functionDavid Blaikie2018-09-201-11/+0
| | | | llvm-svn: 342694
* [New PM] Introducing PassInstrumentation frameworkFedor Sergeev2018-09-204-19/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass Execution Instrumentation interface enables customizable instrumentation of pass execution, as per "RFC: Pass Execution Instrumentation interface" posted 06/07/2018 on llvm-dev@ The intent is to provide a common machinery to implement all the pass-execution-debugging features like print-before/after, opt-bisect, time-passes etc. Here we get a basic implementation consisting of: * PassInstrumentationCallbacks class that handles registration of callbacks and access to them. * PassInstrumentation class that handles instrumentation-point interfaces that call into PassInstrumentationCallbacks. * Callbacks accept StringRef which is just a name of the Pass right now. There were some ideas to pass an opaque wrapper for the pointer to pass instance, however it appears that pointer does not actually identify the instance (adaptors and managers might have the same address with the pass they govern). Hence it was decided to go simple for now and then later decide on what the proper mental model of identifying a "pass in a phase of pipeline" is. * Callbacks accept llvm::Any serving as a wrapper for const IRUnit*, to remove direct dependencies on different IRUnits (e.g. Analyses). * PassInstrumentationAnalysis analysis is explicitly requested from PassManager through usual AnalysisManager::getResult. All pass managers were updated to run that to get PassInstrumentation object for instrumentation calls. * Using tuples/index_sequence getAnalysisResult helper to extract generic AnalysisManager's extra args out of a generic PassManager's extra args. This is the only way I was able to explicitly run getResult for PassInstrumentationAnalysis out of a generic code like PassManager::run or RepeatedPass::run. TODO: Upon lengthy discussions we agreed to accept this as an initial implementation and then get rid of getAnalysisResult by improving RepeatedPass implementation. * PassBuilder takes PassInstrumentationCallbacks object to pass it further into PassInstrumentationAnalysis. Callbacks registration should be performed directly through PassInstrumentationCallbacks. * new-pm tests updated to account for PassInstrumentationAnalysis being run * Added PassInstrumentation tests to PassBuilderCallbacks unit tests. Other unit tests updated with registration of the now-required PassInstrumentationAnalysis. Made getName helper to return std::string (instead of StringRef initially) to fix asan builtbot failures on CGSCC tests. Reviewers: chandlerc, philip.pfaffe Differential Revision: https://reviews.llvm.org/D47858 llvm-svn: 342664
* [IR] add shuffle query for vector concatenationSanjay Patel2018-09-201-0/+45
| | | | | | This can be used for combining and in the vectorizers/cost models. llvm-svn: 342653
* [IR] reduce duplication in unittest for shuffles; NFCSanjay Patel2018-09-201-16/+12
| | | | llvm-svn: 342650
* [llvm-exegesis] Fix broken build bots.Guillaume Chatelet2018-09-202-15/+19
| | | | | | | | | | Reviewers: javed.absar Subscribers: tschuett, courbet, llvm-commits Differential Revision: https://reviews.llvm.org/D52302 llvm-svn: 342646
* [llvm-exegesis] Improve Register Setup (roll forward of D51856).Guillaume Chatelet2018-09-206-204/+311
| | | | | | | | | | | | | | Summary: Added function to set a register to a particular value + tests. Add EFLAGS test, use new setRegTo instead of setRegToConstant. Reviewers: courbet, javed.absar Subscribers: llvm-commits, tschuett, mgorny Differential Revision: https://reviews.llvm.org/D52297 llvm-svn: 342644
* Temporarily Revert "[New PM] Introducing PassInstrumentation framework"Eric Christopher2018-09-204-313/+19
| | | | | | | | as it was causing failures in the asan buildbot. This reverts commit r342597. llvm-svn: 342616
* [New PM] Introducing PassInstrumentation frameworkFedor Sergeev2018-09-194-19/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass Execution Instrumentation interface enables customizable instrumentation of pass execution, as per "RFC: Pass Execution Instrumentation interface" posted 06/07/2018 on llvm-dev@ The intent is to provide a common machinery to implement all the pass-execution-debugging features like print-before/after, opt-bisect, time-passes etc. Here we get a basic implementation consisting of: * PassInstrumentationCallbacks class that handles registration of callbacks and access to them. * PassInstrumentation class that handles instrumentation-point interfaces that call into PassInstrumentationCallbacks. * Callbacks accept StringRef which is just a name of the Pass right now. There were some ideas to pass an opaque wrapper for the pointer to pass instance, however it appears that pointer does not actually identify the instance (adaptors and managers might have the same address with the pass they govern). Hence it was decided to go simple for now and then later decide on what the proper mental model of identifying a "pass in a phase of pipeline" is. * Callbacks accept llvm::Any serving as a wrapper for const IRUnit*, to remove direct dependencies on different IRUnits (e.g. Analyses). * PassInstrumentationAnalysis analysis is explicitly requested from PassManager through usual AnalysisManager::getResult. All pass managers were updated to run that to get PassInstrumentation object for instrumentation calls. * Using tuples/index_sequence getAnalysisResult helper to extract generic AnalysisManager's extra args out of a generic PassManager's extra args. This is the only way I was able to explicitly run getResult for PassInstrumentationAnalysis out of a generic code like PassManager::run or RepeatedPass::run. TODO: Upon lengthy discussions we agreed to accept this as an initial implementation and then get rid of getAnalysisResult by improving RepeatedPass implementation. * PassBuilder takes PassInstrumentationCallbacks object to pass it further into PassInstrumentationAnalysis. Callbacks registration should be performed directly through PassInstrumentationCallbacks. * new-pm tests updated to account for PassInstrumentationAnalysis being run * Added PassInstrumentation tests to PassBuilderCallbacks unit tests. Other unit tests updated with registration of the now-required PassInstrumentationAnalysis. Reviewers: chandlerc, philip.pfaffe Differential Revision: https://reviews.llvm.org/D47858 llvm-svn: 342597
* Fix the build when LLVM_TARGETS_TO_BUILD is empty.Juergen Ributzka2018-09-191-1/+0
| | | | | | | | | | | | | | | Using LLVMTestingSupport in the LLVM_LINK_COMPONENTS breaks the build when LLVM_TARGETS_TO_BUILD is set to empty. Libraries that depend on LLVMTestingSupport need to use target_link_libraries(<target> PRIVATE LLVMTestingSupport) instead. This required change was already commited by r341899 to fix another build issue. This fixes rdar://problem/44615064. llvm-svn: 342593
* Revert rL342544: [New PM] Introducing PassInstrumentation frameworkFedor Sergeev2018-09-194-313/+19
| | | | | | A bunch of bots fail to compile unittests. Reverting. llvm-svn: 342552
* Fix -Wsign-compare warnings. NFCISimon Pilgrim2018-09-191-10/+10
| | | | llvm-svn: 342551
* [New PM] Introducing PassInstrumentation frameworkFedor Sergeev2018-09-194-19/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Pass Execution Instrumentation interface enables customizable instrumentation of pass execution, as per "RFC: Pass Execution Instrumentation interface" posted 06/07/2018 on llvm-dev@ The intent is to provide a common machinery to implement all the pass-execution-debugging features like print-before/after, opt-bisect, time-passes etc. Here we get a basic implementation consisting of: * PassInstrumentationCallbacks class that handles registration of callbacks and access to them. * PassInstrumentation class that handles instrumentation-point interfaces that call into PassInstrumentationCallbacks. * Callbacks accept StringRef which is just a name of the Pass right now. There were some ideas to pass an opaque wrapper for the pointer to pass instance, however it appears that pointer does not actually identify the instance (adaptors and managers might have the same address with the pass they govern). Hence it was decided to go simple for now and then later decide on what the proper mental model of identifying a "pass in a phase of pipeline" is. * Callbacks accept llvm::Any serving as a wrapper for const IRUnit*, to remove direct dependencies on different IRUnits (e.g. Analyses). * PassInstrumentationAnalysis analysis is explicitly requested from PassManager through usual AnalysisManager::getResult. All pass managers were updated to run that to get PassInstrumentation object for instrumentation calls. * Using tuples/index_sequence getAnalysisResult helper to extract generic AnalysisManager's extra args out of a generic PassManager's extra args. This is the only way I was able to explicitly run getResult for PassInstrumentationAnalysis out of a generic code like PassManager::run or RepeatedPass::run. TODO: Upon lengthy discussions we agreed to accept this as an initial implementation and then get rid of getAnalysisResult by improving RepeatedPass implementation. * PassBuilder takes PassInstrumentationCallbacks object to pass it further into PassInstrumentationAnalysis. Callbacks registration should be performed directly through PassInstrumentationCallbacks. * new-pm tests updated to account for PassInstrumentationAnalysis being run * Added PassInstrumentation tests to PassBuilderCallbacks unit tests. Other unit tests updated with registration of the now-required PassInstrumentationAnalysis. Reviewers: chandlerc, philip.pfaffe Differential Revision: https://reviews.llvm.org/D47858 llvm-svn: 342544
* [ADT][BitVector] Add push_back()Simon Pilgrim2018-09-191-0/+31
| | | | | | | | Add a higher performance alternative to calling resize() every time which performs a lot of clearing to zero - when we're adding a single bit most of the time this will be completely unnecessary. Differential Revision: https://reviews.llvm.org/D52236 llvm-svn: 342535
* Fix function signature to actually be an override.Zachary Turner2018-09-181-1/+2
| | | | llvm-svn: 342496
* Revert rL342465: Added function to set a register to a particular value + tests.Simon Pilgrim2018-09-181-245/+165
| | | | | | rL342465 is breaking the MSVC buildbots. llvm-svn: 342490
* Revert rL342466: [llvm-exegesis] Improve Register Setup.Simon Pilgrim2018-09-186-69/+42
| | | | | | | | | | | | | | | | rL342465 is breaking the MSVC buildbots, but I need to revert this dependent revision as well. Summary: Added function to set a register to a particular value + tests. Add EFLAGS test, use new setRegTo instead of setRegToConstant. Reviewers: courbet, javed.absar Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D51856 llvm-svn: 342489
* Remove dead function user_cache_directory()Nico Weber2018-09-181-29/+0
| | | | | | | | | | | | It's been unused since it was added almost 3 years ago in https://reviews.llvm.org/D13801 Motivated by https://reviews.llvm.org/rL342002 since it removes one of the functions keeping a ref to SHGetKnownFolderPath. Differential Revision: https://reviews.llvm.org/D52184 llvm-svn: 342485
* [llvm-exegesis] Improve Register Setup.Guillaume Chatelet2018-09-186-42/+69
| | | | | | | | | | | | | | Summary: Added function to set a register to a particular value + tests. Add EFLAGS test, use new setRegTo instead of setRegToConstant. Reviewers: courbet, javed.absar Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D51856 llvm-svn: 342466
* Added function to set a register to a particular value + tests.Guillaume Chatelet2018-09-181-165/+245
| | | | llvm-svn: 342465
* Improve Register SetupGuillaume Chatelet2018-09-182-8/+71
| | | | llvm-svn: 342464
* [mips] Fix MIPS N32 ABI triples supportSimon Atanasyan2018-09-171-0/+53
| | | | | | | | | | | | Add support mips64(el)-linux-gnuabin32 triples, and set them to N32. Debian architecture name mipsn32/mipsn32el are also added. Set UseIntegratedAssembler for N32 if we can detect it. Patch by YunQiang Su. Differential revision: https://reviews.llvm.org/D51408 llvm-svn: 342416
* Use createTemporaryFile in SampleProfTestAlexander Kornienko2018-09-171-3/+5
| | | | | | | | Create a temporary file in the system temporary directory instead of creating a file in the current directory, which may be not writable. (Fix for an issue introduced in r342283.) llvm-svn: 342386
* [llvm-exegesis] Add predefined floating point values so we can test impact ↵Guillaume Chatelet2018-09-172-0/+72
| | | | | | | | | | | | | | of special values on latency. Summary: This will be useful to generate many configurations and test instruction regimes (NaN, Inf, subnormal, normal). Reviewers: courbet Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D51858 llvm-svn: 342369
* Fix -Wdangling-else gcc warning. NFCI.Simon Pilgrim2018-09-161-2/+4
| | | | llvm-svn: 342344
* Revert r342148 (and follow-on fix attempts r342154, r342180, r342182, r342193)Nico Weber2018-09-152-2/+0
| | | | | | | Many bots buildling with make have been broken for several days, e.g. http://lab.llvm.org:8011/builders/lld-x86_64-darwin13 llvm-svn: 342336
* Fix filesystem race issue in SampleProfTest introduced in rL342283.Wei Mi2018-09-151-11/+9
| | | | | | | | | Before this fix, multiple invocations of testRoundTrip will create multiple writers which share the same file as output destination. That could introduce filesystem race issue when multiple subtests are executed concurrently. This patch assign writers with different files as their output destinations. llvm-svn: 342301
* [SampleFDO] Add FunctionOffsetTable in compact binary format profile.Wei Mi2018-09-141-6/+14
| | | | | | | | | | | | The patch saves a function offset table which maps function name index to the offset of its function profile to the start of the binary profile. By using the function offset table, for those function profiles which will not be used when compiling a module, the profile reader does't have to read them. For profile size around 10~20M, it saves ~10% compile time. Differential Revision: https://reviews.llvm.org/D51863 llvm-svn: 342283
* Introduce explicit add_unittest_with_input_files target for tests that use ↵Nico Weber2018-09-142-1/+4
| | | | | | | | | | | llvm::getInputFileDirectory() Using llvm::getInputFileDirectory() in unit tests is discouraged, so require an explicit opt-in. This way, cmake also writes ~60 fewer unused files to disk. Differential Revision: https://reviews.llvm.org/D52095 llvm-svn: 342248
* [NFC] Link LLVMCore into LLVMExegesisARMTests.Richard Diamond2018-09-131-0/+1
| | | | | | | Fixes missing `llvm::LLVMContext::~LLVMContext()` symbols w/ `BUILD_SHARED_LIBS`. llvm-svn: 342193
* LLVMExegesisX86Tests: link to LLVMCore, too.Roman Lebedev2018-09-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes build for me. Refs. D52054 [215/217] Linking CXX executable unittests/tools/llvm-exegesis/X86/LLVMExegesisX86Tests FAILED: unittests/tools/llvm-exegesis/X86/LLVMExegesisX86Tests : && /usr/bin/g++ -pipe -O2 -g0 -UNDEBUG -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -pipe -O2 -g0 -UNDEBUG -fuse-ld=lld -Wl,--color-diagnostics -Wl,-allow-shlib-undefined -Wl,-O3 -Wl,--gc-sections unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/AssemblerTest.cpp.o unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/AnalysisTest.cpp.o unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/SnippetGeneratorTest.cpp.o unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/RegisterAliasingTest.cpp.o unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/TargetTest.cpp.o -o unittests/tools/llvm-exegesis/X86/LLVMExegesisX86Tests -Wl,-rpath,/build/llvm-build-GCC-release/lib lib/libLLVMMC.so.8svn lib/libLLVMMCParser.so.8svn lib/libLLVMObject.so.8svn lib/libLLVMSymbolize.so.8svn lib/libLLVMX86CodeGen.so.8svn lib/libLLVMX86AsmParser.so.8svn lib/libLLVMX86AsmPrinter.so.8svn lib/libLLVMX86Desc.so.8svn lib/libLLVMX86Disassembler.so.8svn lib/libLLVMX86Info.so.8svn lib/libLLVMX86Utils.so.8svn lib/libLLVMSupport.so.8svn -lpthread lib/libgtest_main.so.8svn lib/libgtest.so.8svn -lpthread lib/libLLVMExegesis.so.8svn lib/libLLVMExegesisX86.so.8svn && : ld.lld: error: undefined symbol: llvm::LLVMContext::~LLVMContext() >>> referenced by AssemblerTest.cpp >>> unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/AssemblerTest.cpp.o:(exegesis::(anonymous namespace)::X86MachineFunctionGeneratorTest_DISABLED_JitFunction_Test::TestBody()) ld.lld: error: undefined symbol: llvm::LLVMContext::~LLVMContext() >>> referenced by AssemblerTest.cpp >>> unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/AssemblerTest.cpp.o:(exegesis::(anonymous namespace)::X86MachineFunctionGeneratorTest_DISABLED_JitFunctionXOR32rr_Default_Test::TestBody()) ld.lld: error: undefined symbol: llvm::LLVMContext::~LLVMContext() >>> referenced by AssemblerTest.cpp >>> unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/AssemblerTest.cpp.o:(void exegesis::MachineFunctionGeneratorBaseTest::Check<int, int, int, int, int, int, int, int>(exegesis::ExegesisTarget const&, llvm::ArrayRef<unsigned int>, llvm::MCInst, int, int, int, int, int, int, int, int)) ld.lld: error: undefined symbol: llvm::LLVMContext::~LLVMContext() >>> referenced by AssemblerTest.cpp >>> unittests/tools/llvm-exegesis/X86/CMakeFiles/LLVMExegesisX86Tests.dir/AssemblerTest.cpp.o:(exegesis::(anonymous namespace)::X86MachineFunctionGeneratorTest_DISABLED_JitFunctionMOV32ri_Test::TestBody()) collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. llvm-svn: 342182
* Revert "[cmake] Fix a unittest when `LLVM_LINK_LLVM_DYLIB` is requested."Volodymyr Sapsai2018-09-131-6/+4
| | | | | | | | | | This reverts commit r342150 as it caused test failure LLVM-Unit :: Passes/./PluginsTests/PluginsTests.LoadPlugin on multiple bots. llvm-svn: 342169
* Fix a couple of mangling canonicalizer corner case bugs.Richard Smith2018-09-131-0/+17
| | | | | | | | | | | | | | | | Summary: The hash computed for an ArrayType was different when first constructed versus when later profiled due to the constructor default argument, and we were not tracking constructor / destructor variant as part of the mangled name AST, leading to incorrect equivalences. Reviewers: erik.pilkington Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D51463 llvm-svn: 342166
* Common infrastructure for reading a profile remapping file and buildingRichard Smith2018-09-132-0/+97
| | | | | | | | a mangling remapper from it. Differential Revision: https://reviews.llvm.org/D51246 llvm-svn: 342161
* [cmake] Fix a unittest when `LLVM_LINK_LLVM_DYLIB` is requested.Richard Diamond2018-09-131-4/+6
| | | | llvm-svn: 342150
* [llvm-exegesis][NFC] Split BenchmarkRunner classClement Courbet2018-09-131-33/+27
| | | | | | | | | | | | | | | Summary: The snippet-generation part goes to the SnippetGenerator class. This will allow benchmarking arbitrary code (see PR38437). Reviewers: gchatelet Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D51979 llvm-svn: 342117
* [ORC] Add a special 'main' JITDylib that is created on ExecutionSessionLang Hames2018-09-122-2/+12
| | | | | | | | | | | | | | | | | | | | | construction, a new convenience lookup method, and add-to layer methods. ExecutionSession now creates a special 'main' JITDylib upon construction. All subsequently created JITDylibs are added to the main JITDylib's search order by default (controlled by the AddToMainDylibSearchOrder parameter to ExecutionSession::createDylib). The main JITDylib's search order will be used in the future to properly handle cross-JITDylib weak symbols, with the first definition in this search order selected. This commit also adds a new ExecutionSession::lookup convenience method that performs a blocking lookup using the main JITDylib's search order, as this will be a very common operation for clients. Finally, new convenience overloads of IRLayer and ObjectLayer's add methods are introduced that add the given program representations to the main dylib, which is likely to be the common case. llvm-svn: 342086
* [ADT] Made numerous methods of ImmutableList constKristof Umann2018-09-121-0/+30
| | | | | | | | Also added ImmutableList<T>::iterator::operator->. Differential Revision: https://reviews.llvm.org/D51881 llvm-svn: 342045
* [LoopInfo][FIX] Remove leftover dump in unit testJohannes Doerfert2018-09-111-1/+0
| | | | llvm-svn: 341968
* [LoopInfo] Fix Loop::getLoopID() for loops with multiple latchesJohannes Doerfert2018-09-111-0/+56
| | | | | | | | The previous implementation traversed all loop blocks and bailed if one was not a latch block. Since we are only interested in latch blocks, we should only traverse those. llvm-svn: 341926
* [XRay] Add TSC to NewCPUId RecordsDean Michael Berris2018-09-116-20/+20
| | | | | | | | | | | | | | | Summary: This more correctly reflects the data written by the FDR mode runtime. This is a continuation of the work in D50441. Reviewers: mboerger, eizan Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D51911 llvm-svn: 341905
* [XRay] Add missing LLVMTestingSupport target_link_librariesHeejin Ahn2018-09-111-0/+1
| | | | | | Without this builds with `-DLLVM_LINK_LLVM_DYLIB=ON` fail. llvm-svn: 341899
* [XRay] Add the `llvm-xray fdr-dump` implementationDean Michael Berris2018-09-112-1/+158
| | | | | | | | | | | | | | | | | | | Summary: In this change, we implement a `BlockPrinter` which orders records in a Block that's been indexed by the `BlockIndexer`. This is used in the `llvm-xray fdr-dump` tool which ties together the various types and utilities we've been working on, to allow for inspection of XRay FDR mode traces both with and without verification. This change is the final step of the refactoring of D50441. Reviewers: mboerger, eizan Subscribers: mgorny, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D51846 llvm-svn: 341887
* [PDB] Change uint32_t to SymIndex wherever it makes sense.Zachary Turner2018-09-101-1/+1
| | | | | | Although it's just a typedef, it helps for readability. NFC. llvm-svn: 341863
* API to update MemorySSA for cloned blocks and added CFG edges.Alina Sbirlea2018-09-101-0/+192
| | | | | | | | | | | | | | | | Summary: End goal is to update MemorySSA in all loop passes. LoopUnswitch clones all blocks in a loop. SimpleLoopUnswitch clones some blocks. LoopRotate clones some instructions. Some of these loop passes also make CFG changes. This is an API based on what I found needed in LoopUnswitch, SimpleLoopUnswitch, LoopRotate, LoopInstSimplify, LoopSimplifyCFG. Adding dependent patches using this API for context. Reviewers: george.burgess.iv, dberlin Subscribers: sanjoy, jlebar, Prazek, llvm-commits Differential Revision: https://reviews.llvm.org/D45299 llvm-svn: 341855
* [ADT] Support converting to lowercase string in toHexPetr Hosek2018-09-101-0/+2
| | | | | | | | This is useful in certain use-cases such as D51833. Differential Revision: https://reviews.llvm.org/D51835 llvm-svn: 341852
* [XRay] Add a BlockVerifier visitor for FDR RecordsDean Michael Berris2018-09-102-0/+141
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements a `BlockVerifier` type which enforces the invariants of the log structure of FDR mode logs on a per-block basis. This ensures that the data we encounter from an FDR mode log semantically correct (i.e. that records follow the documented "grammar" for FDR mode log records). This is another part of the refactoring of D50441. This is a slightly modified version of rL341628, avoiding the `std::tuple<...>` constructor that is not constexpr in C++11. Reviewers: mboerger, eizan Subscribers: mgorny, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D51723 llvm-svn: 341769
OpenPOWER on IntegriCloud