summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [x86] enable machine combiner reassociations for scalar double-precision addsSanjay Patel2015-07-092-1/+25
| | | | llvm-svn: 241871
* Fix shadowing.Michael J. Spencer2015-07-092-2/+2
| | | | llvm-svn: 241870
* [Object][ELF] Support dumping hash-tables from files with no section table.Michael J. Spencer2015-07-098-27/+102
| | | | | | This time without breaking the bots. llvm-svn: 241869
* MIR Serialization: Serialize the virtual register definitions.Alex Lorenz2015-07-095-7/+141
| | | | | | | | | | | | The virtual registers are serialized using a YAML sequence of YAML inline mappings. Each mapping has the id of the virtual register and the register class. Reviewers: Duncan P. N. Exon Smith Differential Revision: http://reviews.llvm.org/D10981 llvm-svn: 241868
* [LAA] Fix grammar in debug outputAdam Nemet2015-07-091-1/+1
| | | | llvm-svn: 241867
* [LAA] Hide NeedRTCheck logic completely inside canCheckPtrAtRT, NFCAdam Nemet2015-07-091-31/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently canCheckPtrAtRT returns two flags NeedRTCheck and CanDoRT. NeedRTCheck says whether we need checks and CanDoRT whether we can generate the checks. The idea is to encode three states with these: Need/Can: (1) false/dont-care: no checks are needed (2) true/false: we need checks but can't generate them (3) true/true: we need checks and we can generate them This is pretty unnecessary since the caller (analyzeLoop) is only interested in whether we can generate the checks if we actually need them (i.e. 1 or 3). So this change cleans up to return just that (CanDoRTIfNeeded) and pulls all the underlying logic into canCheckPtrAtRT. By doing all this, we simplify analyzeLoop which is the complex function in LAA. There is further room for improvement here by using RtCheck.Need directly rather than a new local variable NeedRTCheck but that's for a later patch. llvm-svn: 241866
* [WinEH] Give up on using CSRs across 32-bit invokes for nowReid Kleckner2015-07-093-25/+54
| | | | | | | | | | | The runtime does not restore CSRs when transferring control back to the function handling the exception. According to the experts on IRC, LLVM's register allocator has no way to model register clobbers that only happen on one edge of the CFG. For now, don't worry about trying to use the meager three CSRs available on 32-bit X86 and just say that such invokes preserve nothing. llvm-svn: 241865
* Expose sjlj preparation through opt for my own debugging purposesReid Kleckner2015-07-093-0/+4
| | | | llvm-svn: 241864
* [Static Analyzer] Basic per checker command line option validation.Gabor Horvath2015-07-094-0/+45
| | | | | | Differential Revision: http://reviews.llvm.org/D8077 llvm-svn: 241863
* MIR Parser: Report an error when parsing machine function with an empty body.Alex Lorenz2015-07-098-0/+42
| | | | | | | | | | This commit adds a new error which is reported when the MIR Parser encounters a machine function without any machine basic blocks. The machine verifier expects that the machine functions have at least one MBB, and this error will prevent machine functions without MBBs from reaching the machine verifier and crashing with an assertion. llvm-svn: 241862
* AMDGPU: Add helper function for implicit parameter offsets.Tom Stellard2015-07-094-4/+28
| | | | | | Patch by: Zoltan Gilian llvm-svn: 241861
* COFF: Fix locally-imported symbol's size for x86.Rui Ueyama2015-07-093-2/+60
| | | | llvm-svn: 241860
* Unbreak WebAssembly buildJF Bastien2015-07-094-26/+6
| | | | | | | | | | | | Summary: D11021 and D11045 didn't update the WebAssembly target's code. It's still experimental so all tests passed. Reviewers: sunfish, joker.eph, echristo Subscribers: llvm-commits, jfb Differential Revision: http://reviews.llvm.org/D11084 llvm-svn: 241859
* WebAssembly: add placeholder intrinsics headerJF Bastien2015-07-092-0/+17
| | | | | | | | | | Reviewers: sunfish Subscribers: llvm-commits, jfb Differential Revision: http://reviews.llvm.org/D11080 llvm-svn: 241858
* COFF: Implement base relocations for x86.Rui Ueyama2015-07-092-9/+31
| | | | | | | | With this patch, LLD is now able to self-link an .exe file for x86 that runs correctly, although I don't think some headers (particularly SEH) are not correct. DLL support is coming soon. llvm-svn: 241857
* COFF: Fix import symbol name mangling.Rui Ueyama2015-07-093-4/+10
| | | | | | For IMPORT_NAME_NOPREFIX symbols, we should remove only one prefix character. llvm-svn: 241854
* COFF: Fix command line options for external commands.Rui Ueyama2015-07-091-2/+2
| | | | llvm-svn: 241853
* Turn debugger interface off by default.Jonathan Peyton2015-07-091-1/+1
| | | | | | Just changed LIBOMP_USE_DEBUGGER to false. llvm-svn: 241852
* [ImplicitNullChecks] Fix a memory leak.Sanjoy Das2015-07-091-1/+1
| | | | llvm-svn: 241851
* [ImplicitNullChecks] Be smarter in picking the memory op.Sanjoy Das2015-07-093-10/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this change ImplicitNullChecks would only pick loads of the form: ``` test Reg, Reg jz elsewhere fallthrough: movl 32(Reg), Reg2 ``` but not (say) ``` test Reg, Reg jz elsewhere fallthrough: inc Reg3 movl 32(Reg), Reg2 ``` This change teaches ImplicitNullChecks to look through "unrelated" instructions like `inc Reg3` when searching for a load instruction to convert to a trapping load. Reviewers: atrick, JosephTremoulet, reames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11044 llvm-svn: 241850
* Create BSD archives by default on OS X.Rafael Espindola2015-07-092-4/+10
| | | | | | | | | They should probably be created on anything that is not windows or linux, but I will test on freebsd before changing that. With this it is possible to bootstrap with llvm-ar instead of ar+ranlib on OS X. llvm-svn: 241849
* CFI: Emit correct bit set information if RTTI is disabled under MS ABI.Peter Collingbourne2015-07-095-15/+42
| | | | | | | | | | | | | | We were previously creating bit set entries at virtual table offset sizeof(void*) unconditionally under the Microsoft C++ ABI. This is incorrect if RTTI data is disabled; in that case the "address point" is at offset 0. This change modifies bit set emission to take into account whether RTTI data is being emitted. Also make a start on a blacklisting scheme for records. Differential Revision: http://reviews.llvm.org/D11048 llvm-svn: 241845
* MIR Serialization: Serialize the simple MachineFrameInfo attributes.Alex Lorenz2015-07-094-0/+185
| | | | | | | | | | | | This commit serializes the 13 scalar boolean and integer attributes from the MachineFrameInfo class: IsFrameAddressTaken, IsReturnAddressTaken, HasStackMap, HasPatchPoint, StackSize, OffsetAdjustment, MaxAlignment, AdjustsStack, HasCalls, MaxCallFrameSize, HasOpaqueSPAdjustment, HasVAStart, and HasMustTailInVarArgFunc. These attributes are serialized as part of the frameInfo YAML mapping, which itself is a part of the machine function's YAML mapping. llvm-svn: 241844
* COFF: Infer machine type earlier than before.Rui Ueyama2015-07-0910-96/+164
| | | | | | | | | | | | | | | | Previously, we infer machine type at the very end of linking after all symbols are resolved. That's actually too late because machine type affects how we mangle symbols (whether or not we need to add "_"). For example, /entry:foo adds "_foo" to the symbol table if x86 but "foo" if x64. This patch moves the code to infer machine type, so that machine type is inferred based on input files given via the command line (but not based on .directives files). llvm-svn: 241843
* llvm-ar: Pad the symbol table to 4 bytes.Rafael Espindola2015-07-092-2/+13
| | | | | | | It looks like ld64 requires it. With this we seem to be able to bootstrap using llvm-ar+/usr/bin/true instead of ar+ranlib (currently on stage2). llvm-svn: 241842
* Rename ModuleContainerGenerator to PCHContainergenerator for consistencyAdrian Prantl2015-07-091-28/+29
| | | | | | and re-clang-format (NFC). llvm-svn: 241841
* COFF: Make /machine:{i386,amd64} aliases to {x86,x64}.Rui Ueyama2015-07-091-1/+3
| | | | | | MSVC linker accepts these aliases. llvm-svn: 241840
* AMDGPU/R600: Return correct chain when lowering loadsMatt Arsenault2015-07-091-8/+2
| | | | | | The other LowerLOAD should be returning the correct chain. llvm-svn: 241839
* [IndVars] Try to use existing values in RewriteLoopExitValues.Sanjoy Das2015-07-092-2/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In RewriteLoopExitValues, before expanding out an SCEV expression using SCEVExpander, try to see if an existing LLVM IR expression already computes the value we're interested in. If so use that existing expression. Apart from reducing IndVars' reliance on the rest of the compilation pipeline, this also prevents IndVars from concluding some expressions as "high cost" when they're not. For instance, `InductiveRangeCheckElimination` often emits code of the following form: ``` len = umin(len_A, len_B) loop: ... if (i++ < len) goto loop outside_loop: use(i) ``` `SCEVExpander` refuses to rewrite the use of `i` in `outside_loop`, since it thinks the value of `i` on loop exit, `len`, is a high cost expansion since it contains an `umax` in it. With this change, `IndVars` can see that it can re-use `len` instead of creating a new expression to compute `umin(len_A, len_B)`. I considered putting this cleverness in `SCEVExpander`, but I was worried that it may then have a deterimental effect on other passes that use it. So I decided it was better to just do this in the one place where it seems like an obviously good idea, with the intent of generalizing later if needed. Reviewers: atrick, reames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10782 llvm-svn: 241838
* Fix 32-bit Linux watchpoint failures.Chaoren Lin2015-07-091-14/+15
| | | | | | | | | | | | | | | | Summary: 32-bit signed return value from ptrace got sign extended when being converted to 64-bit unsigned. Also, replaced tabs with spaces in the source. Reviewers: labath, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11047 llvm-svn: 241837
* [llvm-readobj] Print MIPS PLT tableSimon Atanasyan2015-07-093-73/+198
| | | | | | Now the -mips-plt-got prints both MIPS GOT and PLT tables. llvm-svn: 241836
* [yaml2obj] Initialize sh_addralign field for the .symtab sectionSimon Atanasyan2015-07-092-0/+4
| | | | llvm-svn: 241835
* [ELF] Explicitly configure sections alignment in the tests. NFCSimon Atanasyan2015-07-092-0/+2
| | | | llvm-svn: 241834
* Follow up to safe API patchJonathan Peyton2015-07-092-4/+2
| | | | | | | | | | | | | | A while back, we made an initial change where dangerous C API functions were replaced with macros that translated the dangerous API function calls to safer function calls e.g., sprintf() replaced with KMP_SPRINTF() which translates to sprintf_s() on Windows. Currently, the only operating system where this is applicable is Windows. Unix-like systems are still using the dangerous API e.g., KMP_SPRINTF() translates to sprintf(). Our own testing showed no performance differences. Differential Revision: http://reviews.llvm.org/D9918 llvm-svn: 241833
* Enable debugger supportJonathan Peyton2015-07-0913-6/+469
| | | | | | | | | | | | These changes enable external debuggers to conveniently interface with the LLVM OpenMP Library. Structures are added which describe the important internal structures of the OpenMP Library e.g., teams, threads, etc. This feature is turned on by default (CMake variable LIBOMP_USE_DEBUGGER) and can be turned off with -DLIBOMP_USE_DEBUGGER=off. Differential Revision: http://reviews.llvm.org/D10038 llvm-svn: 241832
* [llvm-readobj] Re-add sanity checking which was accidentally removed in r241764David Majnemer2015-07-091-2/+9
| | | | llvm-svn: 241831
* [llvm-objdump] Require that jump targets shown in -d are functionsDavid Majnemer2015-07-092-6/+21
| | | | | | | Don't let the disassembler pick call <.text> if a function happens to live at the start of the section by only using function symbols. llvm-svn: 241830
* Remove dead code from old 64-bit SEH loweringReid Kleckner2015-07-092-26/+0
| | | | llvm-svn: 241829
* COFF: Fill in the type and storage class in the symbol tableDavid Majnemer2015-07-094-5/+19
| | | | | | | We can use the type and storage class from the symbol's original object file to fill in the linked executable's symbol table. llvm-svn: 241828
* Allow {e,r}bp as the target of {read,write}_register.Pat Gavlin2015-07-0914-18/+90
| | | | | | | | | | This patch allows the read_register and write_register intrinsics to read/write the RBP/EBP registers on X86 iff the targeted register is the frame pointer for the containing function. Differential Revision: http://reviews.llvm.org/D10977 llvm-svn: 241827
* fix an invisible bug when combining repeated FP divisorsSanjay Patel2015-07-092-2/+26
| | | | | | | | | | | | | | | | | | | | | | | This patch fixes bugs that were exposed by the addition of fast-math-flags in the DAG: r237046 ( http://reviews.llvm.org/rL237046 ): 1. When replacing a division node, it's not enough to RAUW. We should call CombineTo() to delete dead nodes and combine again. 2. Because we are changing the DAG, we can't return an empty SDValue after the transform. As the code comments say: Visitation implementation - Implement dag node combining for different node types. The semantics are as follows: Return Value: SDValue.getNode() == 0 - No change was made SDValue.getNode() == N - N was replaced, is dead and has been handled. otherwise - N should be replaced by the returned Operand. The new test case shows no difference with or without this patch, but it will crash if we re-apply r237046 or enable FMF via the current -enable-fmf-dag cl::opt. Differential Revision: http://reviews.llvm.org/D9893 llvm-svn: 241826
* Add GCC-compatible flags -fprofile-generate and -fprofile-use.Diego Novillo2015-07-098-26/+180
| | | | | | | | | | | | | | | | | | This patch adds support for specifying where the profile is emitted in a way similar to GCC. These flags are used to specify directories instead of filenames. When -fprofile-generate=DIR is used, the compiler will generate code to write to <DIR>/default.profraw. The patch also adds a couple of extensions: LLVM_PROFILE_FILE can still be used to override the directory and file name to use and -fprofile-use accepts both directories and filenames. To simplify the set of flags used in the backend, all the flags get canonicalized to -fprofile-instr-{generate,use} when passed to the backend. The decision to use a default name for the profile is done in the driver. llvm-svn: 241825
* Add support for generating profiles in a given directory.Diego Novillo2015-07-099-27/+92
| | | | | | | | | | When the file is initialized, this patch checks whether the path specifies a directory. If so, it creates the directory tree before truncating the file. Use default.profdata instead of pgo-data for default indexed profile name. llvm-svn: 241824
* [StackMap] Use lambdas to specify the sort and erase conditions. NFC.Juergen Ributzka2015-07-092-13/+14
| | | | llvm-svn: 241823
* [StackMap] Rename variables to be more consistent. NFC.Juergen Ributzka2015-07-092-50/+50
| | | | | | Rename a few variables and use auto for long iterator names. llvm-svn: 241822
* [StackMaps] Use emplace_back when possible. NFC.Juergen Ributzka2015-07-091-5/+5
| | | | llvm-svn: 241821
* Unbreak Makefile buildKeno Fischer2015-07-093-0/+16
| | | | llvm-svn: 241820
* COFF: Remove Writer::Is64 and use Config::is64 instead. NFC.Rui Ueyama2015-07-092-8/+6
| | | | llvm-svn: 241819
* Add a test of a regression discovered during testing of r241673Silviu Baranga2015-07-091-0/+64
| | | | | | | | | | | | | | | Summary: We were missing a corner case where DepCands was not available, but we were using DepCands to compute the checking pointer groups. This adds a test for that regression. Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11068 llvm-svn: 241818
* AMDGPU/SI: The SIShrinkInstructions pass should only fold immediates with ↵Tom Stellard2015-07-091-1/+1
| | | | | | | | | one use This is convered by existing testcases and will be exposed by a future commit. llvm-svn: 241817
OpenPOWER on IntegriCloud