summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove svn-properties for file added in 313909 (NFC)Erich Keane2017-09-210-0/+0
| | | | llvm-svn: 313911
* [dwarfdump] Add verbose output for .debug-line sectionJonas Devlieghere2017-09-2118-447/+552
| | | | | | | | | | | | This patch adds dumping of line table instructions as well as the final state at each specified pc value in verbose mode. This is essentially the same as the default in Darwin's dwarfdump. Dumping the actual line table opcodes can be particularly useful for something like debugging a bad `.debug_line` section. Differential revision: https://reviews.llvm.org/D37971 llvm-svn: 313910
* Add testcase I forgot to add in R313907.Erich Keane2017-09-211-0/+21
| | | | llvm-svn: 313909
* [DAGCombiner] Slightly simplify some code by using APInt::isMask() and ↵Craig Topper2017-09-211-3/+3
| | | | | | | | countTrailingOnes instead of getting active bits and checking if all the bits below that make a mask. At least for the 64-bit and less case, we should be able to determine if we even have a mask without counting any bits. This also removes the need to explicitly check for 0 active bits, isMask will return false for 0. llvm-svn: 313908
* Suppress Wsign-conversion for enums with matching underlying typeErich Keane2017-09-211-1/+4
| | | | | | | | | | | | | | | As reported here: https://bugs.llvm.org/show_bug.cgi?id=34692 A non-defined enum with a backing type was always defaulting to being treated as a signed type. IN the case where it IS defined, the signed-ness of the actual items is used. This patch uses the underlying type's signed-ness in the non-defined case to test signed-comparision. Differential Revision: https://reviews.llvm.org/D38145 llvm-svn: 313907
* [Sema] Prevent InstantiateClass from checking unrelated exception specs.Volodymyr Sapsai2017-09-214-11/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | Sema::InstantiateClass should check only exception specs added during class instantiation and ignore already present delayed specs. This fixes a case where we instantiate a class before parsing member initializers, check exceptions for a different class and fail to find a member initializer. Which is required for comparing exception specs for explicitly-defaulted and implicit default constructor. With the fix we are still checking exception specs but only after member initializers are present. Removing errors in crash-unparsed-exception.cpp is acceptable according to discussion in PR24000 because other compilers accept code in crash-unparsed-exception.cpp as valid. rdar://problem/34167492 Reviewers: davide, rsmith Reviewed By: rsmith Subscribers: dim, cfe-commits Differential Revision: https://reviews.llvm.org/D37881 llvm-svn: 313906
* Re-land r313825: "[IR] Add llvm.dbg.addr, a control-dependent version of ↵Reid Kleckner2017-09-2120-134/+850
| | | | | | | | | | | | | | | | | | | | | | | | | | | llvm.dbg.declare" The fix is to avoid invalidating our insertion point in replaceDbgDeclare: Builder.insertDeclare(NewAddress, DIVar, DIExpr, Loc, InsertBefore); + if (DII == InsertBefore) + InsertBefore = &*std::next(InsertBefore->getIterator()); DII->eraseFromParent(); I had to write a unit tests for this instead of a lit test because the use list order matters in order to trigger the bug. The reduced C test case for this was: void useit(int*); static inline void inlineme() { int x[2]; useit(x); } void f() { inlineme(); inlineme(); } llvm-svn: 313905
* [LLDB] Implement interactive command interruptionAdrian McCarthy2017-09-218-22/+121
| | | | | | | | | | | | | | | | | | | | | The core of this change is the new CommandInterpreter::m_command_state, which models the state transitions for interactive commands, including an "interrupted" state transition. In general, command interruption requires cooperation from the code executing the command, which needs to poll for interruption requests through CommandInterpreter::WasInterrupted(). CommandInterpreter::PrintCommandOutput() implements an optionally interruptible printing of the command output, which for large outputs was likely the longest blocking part. (ex. target modules dump symtab on a complex binary could take 10+ minutes) patch by lemo Differential Revision: https://reviews.llvm.org/D37923 llvm-svn: 313904
* [DeLICM] Allow non-injective PHIRead->PHIWrite mapping.Michael Kruse2017-09-212-1/+128
| | | | | | | | | | | | | | | | | | | | Remove an assertion that tests the injectivity of the PHIRead -> PHIWrite relation. That is, allow a single PHI write to be used by multiple PHI reads. This may happen due to some statements containing the PHI write not having the statement instances that would overwrite the previous incoming value due to (assumed/invalid) contexts. This result in that PHI write is mapped to multiple targets which is not supported. Codegen will select one one of the targets using getAddressFunction(). However, the runtime check should protect us from this case ever being executed. We therefore allow injective PHI relations. Additional calculations to detect/santitize this case would probably not be worth the compuational effort. This fixes llvm.org/PR34485 llvm-svn: 313902
* [SelectionDAG] Pick correct frame index in LowerArgumentsBjorn Pettersson2017-09-212-2/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: SelectionDAGISel::LowerArguments is associating arguments with frame indices (FuncInfo->setArgumentFrameIndex). That information is later on used by EmitFuncArgumentDbgValue to create DBG_VALUE instructions that denotes that a variable can be found on the stack. I discovered that for our (big endian) out-of-tree target the association created by SelectionDAGISel::LowerArguments sometimes is wrong. I've seen this happen when a 64-bit value is passed on the stack. The argument will occupy two stack slots (frame index X, and frame index X+1). The fault is that a call to setArgumentFrameIndex is associating the 64-bit argument with frame index X+1. The effect is that the debug information (DBG_VALUE) will point at the least significant part of the arguement on the stack. When printing the argument in a debugger I will get the wrong value. I managed to create a test case for PowerPC that seems to show the same kind of problem. The bugfix will look at the datalayout, taking endianness into account when examining a BUILD_PAIR node, assuming that the least significant part is in the first operand of the BUILD_PAIR. For big endian targets we should use the frame index from the second operand, as the most significant part will be stored at the lower address (using the highest frame index). Reviewers: bogner, rnk, hfinkel, sdardis, aprantl Reviewed By: aprantl Subscribers: nemanjai, aprantl, llvm-commits, igorb Differential Revision: https://reviews.llvm.org/D37740 llvm-svn: 313901
* llvm-dwarfdump support --debug-frame=<offset> and --eh-frame=<offset>Adrian Prantl2017-09-214-18/+52
| | | | llvm-svn: 313900
* [CUDA] Fixed order of words in the names of shfl builtins.Artem Belevich2017-09-211-4/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D38147 llvm-svn: 313899
* [NVPTX] Implemented bar.warp.sync, barrier.sync, and vote{.sync} ↵Artem Belevich2017-09-219-3/+322
| | | | | | | | instructions/intrinsics/builtins. Differential Revision: https://reviews.llvm.org/D38148 llvm-svn: 313898
* [Sema] Fix using old initializer during switch statement transformation.Volodymyr Sapsai2017-09-212-2/+33
| | | | | | | | | | | | | | | | | | | | | It fixes a crash in CodeGen when we are trying to generate code for initializer expression created before template instantiation, like CallExpr '<dependent type>' |-UnresolvedLookupExpr '<overloaded function type>' lvalue (ADL) = 'parse' `-DeclRefExpr 'Buffer<N>' lvalue ParmVar 'buffer' 'Buffer<N>' rdar://problem/33888545 Reviewers: rsmith, ahatanak Reviewed By: ahatanak Subscribers: aemerson, kristof.beyls, cfe-commits Differential Revision: https://reviews.llvm.org/D38009 llvm-svn: 313896
* Use ArrayRef. NFC.Rafael Espindola2017-09-212-2/+2
| | | | llvm-svn: 313895
* [fixup][Sema] Allow in C to define tags inside enumerations.Volodymyr Sapsai2017-09-212-2/+4
| | | | | | | | | | | | | | | | Fix for too aggressive error err_type_defined_in_enum introduced in r313386. Defining tags inside enumerations is prohibited in C++ but allowed in C. Reviewers: aaron.ballman, rnk, doug.gregor Reviewed By: rnk Subscribers: alberto_magni, cfe-commits Differential Revision: https://reviews.llvm.org/D38109 llvm-svn: 313894
* [x86] add more tests for node-level FMF; NFCSanjay Patel2017-09-211-0/+45
| | | | llvm-svn: 313893
* [lit] Rename lld and clang lit configs to end in .pyZachary Turner2017-09-2110-12/+21
| | | | | | | | | | This follows in line with a previous patch of renaming LLVM's. Working on these files is difficult in certain operating systems and/or environments that don't like handling python code with a non .py file extension. llvm-svn: 313892
* [DAGCombiner] Remove duplicate code from visitZERO_EXTENDCraig Topper2017-09-211-14/+0
| | | | | | | | This exact block of code exists right below. Differential Revision: https://reviews.llvm.org/D38122 llvm-svn: 313891
* Fix buildbot failures, add mtriple to gpr-vsr-spill.llZaara Syeda2017-09-211-1/+1
| | | | llvm-svn: 313890
* [lit] Don't norm case when inserting into the config map.Zachary Turner2017-09-215-7/+3
| | | | | | | | This makes all paths lowercase on Windows, which seemed like a good idea at the time, but it means that tests can't properly use FileCheck to match expected path names. llvm-svn: 313889
* llvm-dwarfdump: Add support for the --arch command line option.Adrian Prantl2017-09-212-17/+71
| | | | llvm-svn: 313888
* [lit] Add a test for the builtin config map.Zachary Turner2017-09-2110-4/+64
| | | | | | | | | | | | | | | | | | | Config map is not exposed through the command line, so testing this is somewhat tricky. But basically we need a test that if a custom driver builds a config map and passes it to main, it gets respected. A config map allows config files in the source tree to be mapped to alternate config files in the build tree. This particular test works by having two config files in separate directories, and setting up a config map to have that redirects A/lit.site.cfg to B/altconfig. Then, we print a message in A/lit.site.cfg and B/altconfig and check that we do see the output from B but don't see the output from A. Additionally we test that the test suite specified by A's config map is properly discovered. Differential Revision: https://reviews.llvm.org/D38105 llvm-svn: 313887
* [Power9] Spill gprs to vector registers rather than stackZaara Syeda2017-09-215-1/+145
| | | | | | | | | | This patch updates register allocation to enable spilling gprs to volatile vector registers rather than the stack. It can be enabled for Power9 with option -ppc-enable-gpr-to-vsr-spills. Differential Revision: https://reviews.llvm.org/D34815 llvm-svn: 313886
* Add missing file from r313884.Benjamin Kramer2017-09-211-1/+1
| | | | llvm-svn: 313885
* [DWARF] Shrink AttributeSpec from 24 to 16 bytes.Benjamin Kramer2017-09-212-20/+42
| | | | | | | This is a bit ugly because we can't put Optional into a union. Hide all of that behind a set of accessors and make accesses safer using asserts. llvm-svn: 313884
* [X86][SSE] Add PSHUFLW/PSHUFHW tests inspired by PR34686Simon Pilgrim2017-09-212-0/+96
| | | | llvm-svn: 313883
* [MIPS] Explicitly list supported relocations for MIPS target. NFCSimon Atanasyan2017-09-211-3/+26
| | | | | | | This is change is inspired by the D28611 patch. New supported relocations have been added to the switch statement. llvm-svn: 313882
* [ScopInfo] Use map for value def/PHI read accesses.Michael Kruse2017-09-213-10/+93
| | | | | | | | | | | | | | | | | | | | | | | Before this patch, ScopInfo::getValueDef(SAI) used getStmtFor(Instruction*) to find the MemoryAccess that writes a MemoryKind::Value. In cases where the value is synthesizable within the statement that defines, the instruction is not added to the statement's instruction list, which means getStmtFor() won't return anything. If the synthesiable instruction is not synthesiable in a different statement (due to being defined in a loop that and ScalarEvolution cannot derive its escape value), we still need a MemoryKind::Value and a write to it that makes it available in the other statements. Introduce a separate map for this purpose. This fixes MultiSource/Benchmarks/MallocBench/cfrac where -polly-simplify could not find the writing MemoryAccess for a use. The write was not marked as required and consequently was removed. Because this could in principle happen as well for PHI scalars, add such a map for PHI reads as well. llvm-svn: 313881
* [OPENMP] Use canonical declarations for redeclarations checks.Alexey Bataev2017-09-213-7/+10
| | | | | | | | | If the captured variable has some redeclarations we may run into the situation where the redeclaration is used instead of the canonical declaration and we may consider this variable as one not captured before. llvm-svn: 313880
* [mips] Implement generation of relocations "chains" used by N32 ABISimon Atanasyan2017-09-212-0/+39
| | | | | | | | | In case of using a "nested" relocation expressions like this `%hi(%neg(%gp_rel()))`, N32 ABI requires generation of three consecutive relocations. That differs from the N64 ABI case where all relocations are packed into the single relocation record. llvm-svn: 313879
* [mips] Do not pass redundant IsN64 flag to MCELFObjectTargetWriter. NFCSimon Atanasyan2017-09-214-17/+10
| | | | | | | | Now we pass the 'Is64_' flag to the MCELFObjectTargetWriter ctor iif when we make deal with N64 ABI. So it is redundant to pass additional 'IsN64' flag. llvm-svn: 313878
* [SystemZ] Improve optimizeCompareZero()Jonas Paulsson2017-09-212-7/+80
| | | | | | | | | | More conversions to load-and-test can be made with this patch by adding a forward search in optimizeCompareZero(). Review: Ulrich Weigand https://reviews.llvm.org/D38076 llvm-svn: 313877
* Revert r313825: "[IR] Add llvm.dbg.addr, a control-dependent version of ↵Daniel Jasper2017-09-2118-776/+134
| | | | | | | | | | | llvm.dbg.declare" .. as well as the two subsequent changes r313826 and r313875. This leads to segfaults in combination with ASAN. Will forward repro instructions to the original author (rnk). llvm-svn: 313876
* [SROA] Really remove associated dbg.declare when removing dead allocaMikael Holmen2017-09-213-8/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: There already was code that tried to remove the dbg.declare, but that code was placed after we had called I->replaceAllUsesWith(UndefValue::get(I->getType())); on the alloca, so when we searched for the relevant dbg.declare, we couldn't find it. Now we do the search before we call RAUW so there is a chance to find it. An existing testcase needed update due to this. Two dbg.declare with undef were removed and then suddenly one of the two CHECKS failed. Before this patch we got call void @llvm.dbg.declare(metadata i24* undef, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 32, 24)), !dbg !15 call void @llvm.dbg.declare(metadata %struct.prog_src_register* undef, metadata !14, metadata !DIExpression()), !dbg !15 call void @llvm.dbg.value(metadata i32 0, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 32)), !dbg !15 call void @llvm.dbg.value(metadata i32 0, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 32, 24)), !dbg !15 and with it we get call void @llvm.dbg.value(metadata i32 0, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 32)), !dbg !15 call void @llvm.dbg.value(metadata i32 0, metadata !14, metadata !DIExpression(DW_OP_LLVM_fragment, 32, 24)), !dbg !15 However, the CHECKs in the testcase checked things in a silly order, so they only passed since they found things in the first dbg.declare. Now we changed the order of the checks and the test passes. Reviewers: rnk Reviewed By: rnk Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37900 llvm-svn: 313875
* [TableGen] Tidy up CodeGenRegistersJaved Absar2017-09-211-28/+23
| | | | | | | | | Replacing range loops. Reviewed by: @MatzeB Differential Revision: https://reviews.llvm.org/D38091 llvm-svn: 313874
* [mips] Fix relocation record format and ELF header for N32 ABISimon Atanasyan2017-09-2110-47/+188
| | | | | | | | | | | | | | | The N32 ABI uses RELA relocation format, do not use 3-in-1 relocation's encoding, and uses ELFCLASS32. This change passes the `IsN32` flag to the `MCAsmBackend` to distinguish usage of N32 ABI. We still do not handle some cases like providing the `-target-abi=o32` command line option with the `mips64` target triple. That's why elf_header.s contains some "FIXME" strings. This case will be fixed in a separate patch. Differential revision: https://reviews.llvm.org/D37960 llvm-svn: 313873
* [dsymutil] Don't resolve DIE reference to NULL DIE.Jonas Devlieghere2017-09-213-2/+47
| | | | | | | | | | | | | This patch prevents dsymutil from resolving a reference to a NULL DIE when a bogus reference happens to be coincidentally referencing a NULL DIE. Now this is detected as an invalid reference and a warning is printed. Fixes: https://bugs.llvm.org/show_bug.cgi?id=33873 Differential revision: https://reviews.llvm.org/D38078 llvm-svn: 313872
* [XRay][compiler-rt] Remove non-trivial globals from xray_log_interface.ccDean Michael Berris2017-09-211-6/+6
| | | | | | | | | | | | | | Summary: Remove dependency on std::unique_ptr<...> for the global representing the installed XRay implementation. Reviewers: dblaikie, kpw, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38121 llvm-svn: 313871
* Fixed reverted commit rL312318Strahinja Petrovic2017-09-215-1/+152
| | | | | | | | | | This patch contains fix for reverted commit rL312318 which was causing failure due to use of unchecked dyn_cast to CIInit. Patch by: Nikola Prica. llvm-svn: 313870
* [X86] Adding a testpoint for fast-math flags propagation.Jatin Bhateja2017-09-211-0/+47
| | | | | | | | | | | | Reviewers: jbhateja Reviewed By: jbhateja Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38127 llvm-svn: 313869
* [yaml2obj] - Don't crash on one more invalid document.George Rimar2017-09-212-5/+13
| | | | | | | | | This fixes one more crash I faced. Testcase contains minimal reduced case. Differential revision: https://reviews.llvm.org/D38082 llvm-svn: 313868
* [analyzer] Fix an assertion fail in VirtualCallCheckerGabor Horvath2017-09-212-1/+22
| | | | | | Differential Revision: https://reviews.llvm.org/D37978 llvm-svn: 313866
* AMDGPU: Add option to stress callsMatt Arsenault2017-09-212-3/+49
| | | | | | | This inverts the behavior of the AlwaysInline pass to mark every function not already marked alwaysinline as noinline. llvm-svn: 313865
* [MIPS] Restore checking of the disassembler output. NFCSimon Atanasyan2017-09-211-36/+24
| | | | llvm-svn: 313864
* [X86] Remove execute permissions from a couple files.Craig Topper2017-09-212-0/+0
| | | | llvm-svn: 313863
* [X86] Remove windows line endings.Craig Topper2017-09-211-919/+919
| | | | llvm-svn: 313862
* [X86] Remove unused tablegen class.Craig Topper2017-09-211-7/+0
| | | | llvm-svn: 313861
* [TableGen] Use CHAR_BIT instead of hardcoded 8 with sizeof. NFCCraig Topper2017-09-211-1/+1
| | | | llvm-svn: 313860
* [TableGen] Include StringMap.h instead of StringSet.h since that's the data ↵Craig Topper2017-09-211-1/+1
| | | | | | structure we use. llvm-svn: 313859
OpenPOWER on IntegriCloud