summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [RewriteStatepointsForGC] Exclude constant values from being considered live ↵Philip Reames2015-04-262-14/+74
| | | | | | | | | | | | at a safepoint There can be various constant pointers in the IR which do not get relocated at a safepoint. One example is the address of a global variable. Another example is a pointer created via inttoptr. Note that the optimizer itself likes to create such inttoptrs when locally propagating constants through dynamically dead code. To deal with this, we need to exclude uses of constants from contributing to the liveness of a safepoint which might reach that use. At some later date, it might be worth exploring what could be done to support the relocation of various special types of "constants", but that's future work. Differential Revision: http://reviews.llvm.org/D9236 llvm-svn: 235821
* Don't Place Entry Safepoints Before the llvm.frameescape() IntrinsicPhilip Reames2015-04-262-0/+36
| | | | | | | | | llvm.frameescape() intrinsic is not a real call. The intrinsic can only exist in the entry block. Inserting a gc.statepoint() before llvm.frameescape() may split the entry block, and push the intrinsic out of the entry block. Patch by: Swaroop.Sridhar@microsoft.com Differential Revision: http://reviews.llvm.org/D8910 llvm-svn: 235820
* [bpf] fix build and remove a compiler warning in Release modeAlexei Starovoitov2015-04-262-1/+3
| | | | | | Patch by Brenden Blanco. llvm-svn: 235814
* R600: Remove / merge redundant testcasesMatt Arsenault2015-04-263-43/+12
| | | | llvm-svn: 235813
* [x86] instcombine more cases of insertps into a shufflevectorSanjay Patel2015-04-252-19/+69
| | | | | | | | | | | | This is a follow-on to D8833 (insertps optimization when the zero mask is not used). In this patch, we check for the case where the zmask is used, but both input vectors to the insertps intrinsic are the same operand or the zmask overrides the destination lane. This lets us replace the 2nd shuffle input operand with the zero vector. Differential Revision: http://reviews.llvm.org/D9257 llvm-svn: 235810
* add SSE run to check non-AVX codegenSanjay Patel2015-04-251-16/+38
| | | | llvm-svn: 235809
* [ARM] Simplify code. NFC.Benjamin Kramer2015-04-251-15/+2
| | | | llvm-svn: 235803
* [hexagon] Use range-based for loops. No functionality change intended.Benjamin Kramer2015-04-251-69/+45
| | | | llvm-svn: 235802
* [hexagon] Remove setHexLibcallName, it leaks memory.Benjamin Kramer2015-04-252-79/+83
| | | | | | | Just spell out the full names, it's not that much more code. No functional change intended. llvm-svn: 235801
* line endings fixSimon Pilgrim2015-04-251-8/+8
| | | | llvm-svn: 235800
* build: make libunwind a proper projectSaleem Abdulrasool2015-04-251-1/+3
| | | | | | This allows the build infrastructure to properly detect and build libunwind. llvm-svn: 235796
* Fix build error from accidental changeAndrew Kaylor2015-04-241-2/+1
| | | | llvm-svn: 235792
* [WinEH] Find correct cloned entry block for outlined handler functions.Andrew Kaylor2015-04-241-1/+2
| | | | llvm-svn: 235791
* [WinEH] Find correct cloned entry block for outlined handler functions.Andrew Kaylor2015-04-241-4/+13
| | | | llvm-svn: 235789
* Assert that Process::FindInEnvPath() is passed a relative path.Nico Weber2015-04-241-0/+1
| | | | | | | It misbehaves with absolute paths. (So does path::append().) Goes with clang r235787. llvm-svn: 235788
* Linker: Copy over function metadata attachmentsDuncan P. N. Exon Smith2015-04-243-0/+46
| | | | | | | Update `lib/Linker` to handle `Function` metadata attachments. The attachments stick with the function body. llvm-svn: 235786
* IR: Add assembly/bitcode support for function metadata attachmentsDuncan P. N. Exon Smith2015-04-247-9/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add serialization support for function metadata attachments (added in r235783). The syntax is: define @foo() !attach !0 { Metadata attachments are only allowed on functions with bodies. Since they come before the `{`, they're not really part of the body; since they require a body, they're not really part of the header. In `LLParser` I gave them a separate function called from `ParseDefine()`, `ParseOptionalFunctionMetadata()`. In bitcode, I'm using the same `METADATA_ATTACHMENT` record used by instructions. Instruction metadata attachments are included in a special "attachment" block at the end of a `Function`. The attachment records are laid out like this: InstID (KindID MetadataID)+ Note that these records always have an odd number of fields. The new code takes advantage of this to recognize function attachments (which don't need an instruction ID): (KindID MetadataID)+ This means we can use the same attachment block already used for instructions. This is part of PR23340. llvm-svn: 235785
* Verifier: Function metadata attachments require a bodyDuncan P. N. Exon Smith2015-04-242-0/+31
| | | | | | | | Add a verifier check that only functions with bodies have metadata attachments. This should help catch bugs in frontends and transformation passes. Part of PR23340. llvm-svn: 235784
* IR: Add Function metadata attachmentsDuncan P. N. Exon Smith2015-04-245-1/+230
| | | | | | | | Add IR support for `Metadata` attachments. Assembly and bitcode support will follow shortly, but for now we just have unit tests. This is part of PR23340. llvm-svn: 235783
* LLParser: Simplify ParseInstructionMetadata(), NFCDuncan P. N. Exon Smith2015-04-242-7/+6
| | | | | | | | Remove unused `PFS` variable and take the `Instruction` by reference. (Not really related to PR23340, but might as well clean this up while I'm here.) llvm-svn: 235782
* [DAGCombiner] Fix the type used in canFoldInAddressingMode to account for theQuentin Colombet2015-04-241-2/+2
| | | | | | | | | | | | | | | | | | right scaling. In the function canFoldInAddressingMode, VT is computed as the type of the destination/source of a LOAD/STORE operations, instead of the memory type of the operation. On targets with a scaling factor on the offset of the LOAD/STORE operations, the function may return false for actually valid cases. This may then prevent the selection of profitable pre or post indexed load/store operations, and instead select pre or post indexed load/store for unprofitable cases. Patch by Francois de Ferriere <francois.de-ferriere@st.com>! Differential Revision: http://reviews.llvm.org/D9146 llvm-svn: 235780
* LLParser: Split out ParseMetadataAttachment(), NFCDuncan P. N. Exon Smith2015-04-242-5/+15
| | | | | | Make the code reusable for `Function` metadata attachments (PR23340). llvm-svn: 235778
* [opaque pointer type] Verifier/AutoUpgrade: Remove a few uses of ↵David Blaikie2015-04-243-18/+18
| | | | | | PointerType::getElementType llvm-svn: 235777
* AsmWriter: Parameterize the syntactic separator for attachmentsDuncan P. N. Exon Smith2015-04-241-8/+10
| | | | | | | | Parameterize the separator for attachments, since `Function` metadata attachments (PR23340) aren't going to use a `,` (comma). No real functionality change. llvm-svn: 235775
* AsmWriter: Only collect attachment names once per moduleDuncan P. N. Exon Smith2015-04-241-2/+4
| | | | | | | | Collect metadata names once per `AssemblyWriter` instead of every time we need to print some attachments. Just a drive-by; this caught my eye while I was refactoring the code in r235772. llvm-svn: 235774
* Remove an unused variable to prevent -Werror build failures.Kaelyn Takata2015-04-241-1/+0
| | | | llvm-svn: 235773
* AsmWriter: Split out code for printing Metadata attachments, NFCDuncan P. N. Exon Smith2015-04-241-14/+25
| | | | | | | Refactor the code for printing `Instruction` metadata attachments so it can be reused for `Function`. llvm-svn: 235772
* SimplifyCFG: Correctly handle switch lookup tables which fully cover the ↵Hans Wennborg2015-04-242-4/+38
| | | | | | | | | | | | | input type and use bit tests to check for holes When using bit tests for hole checks, we call AddPredecessorToBlock to give the phi node a value from the bit test block. This would break if we've previously called removePredecessor on the default destination because the switch is fully covered. Test case by Mark Lacey. llvm-svn: 235771
* IR: Use a bitmask to access GlobalObject subclass dataDuncan P. N. Exon Smith2015-04-242-3/+15
| | | | | | | | Make room for more than just `Function::isMaterializable()` in the `GlobalObject` subclass data bitfield. Since we're treating it like a bitfield, change `Function::Function()` to zero-out the whole thing. llvm-svn: 235770
* IR: Extract set logic from Instruction attachments, NFCDuncan P. N. Exon Smith2015-04-242-57/+99
| | | | | | | | | | | Extract the set logic for metadata attachments from `Instruction` so it can be reused for `Function` (PR23340). This data structure makes a `SmallVector<>` look (a little) like a map, just doing the bare minimum to support the `Instruction` (and soon, `Function`) metadata API. llvm-svn: 235769
* [SEH] Implement GetExceptionCode in __except blocksReid Kleckner2015-04-248-33/+108
| | | | | | | | | This introduces an intrinsic called llvm.eh.exceptioncode. It is lowered by copying the EAX value live into whatever basic block it is called from. Obviously, this only works if you insert it late during codegen, because otherwise mid-level passes might reschedule it. llvm-svn: 235768
* IR: Use remove_if for Instruction::dropUnknownMetadata()Duncan P. N. Exon Smith2015-04-241-16/+8
| | | | | | | | | | Technically the operations are different -- the old logic moved items from the back into the opened-up slots, instead of the usual `remove_if()` logic of a slow and a fast iterator -- but unless a profile tells us otherwise I prefer the simpler logic here. Regardless, there shouldn't be an observable function change. llvm-svn: 235767
* IR: Remove MDMapTy and MDPairTy typedefs, NFCDuncan P. N. Exon Smith2015-04-242-17/+10
| | | | | | | Remove some typedefs in preparation for factoring out attachment logic from `Instruction`. llvm-svn: 235764
* IR: Rename LLVMContextImpl::MetadataStore to InstructionMetadataDuncan P. N. Exon Smith2015-04-242-21/+23
| | | | | | | Rename `MetadataStore` to the more explicit `InstructionMetadata`. This will make room for `FunctionMetadata` (start of PR23340). llvm-svn: 235763
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-04-2417-78/+69
| | | | | | | | | | the invoke instruction Same as r235145 for the call instruction - the justification, tradeoffs, etc are all the same. The conversion script worked the same without any false negatives (after replacing 'call' with 'invoke'). llvm-svn: 235755
* [PATCH] [Hexagon] Adding a test case for calling convention.Sundeep Kushwaha2015-04-241-0/+73
| | | | | | http://reviews.llvm.org/D9241 llvm-svn: 235754
* [AsmPrinter] Make AsmPrinter's OutStreamer member a unique_ptr.Lang Hames2015-04-2437-973/+978
| | | | | | | AsmPrinter owns the OutStreamer, so an owning pointer makes sense here. Using a reference for this is crufty. llvm-svn: 235752
* Revert changes to LTO test case since llvm-lto can't handle textual IR inputsDavid Blaikie2015-04-241-1/+2
| | | | llvm-svn: 235738
* Skip extra LLVM IR assemble/disassemble steps in some testsDavid Blaikie2015-04-242-4/+2
| | | | llvm-svn: 235736
* [opaque pointer type] bitcode: add explicit callee type to invoke instructionsDavid Blaikie2015-04-245-18/+33
| | | | llvm-svn: 235735
* Fix LoopInterchange/reductions.ll test for debug buildsAndrew Kaylor2015-04-241-2/+2
| | | | llvm-svn: 235734
* Teach AArch64\lit.local.cfg the new triple names windows-gnu and windows-msvc.Yaron Keren2015-04-241-1/+1
| | | | | | Tests were failing when built with -DLLVM_DEFAULT_TARGET_TRIPLE=i686-pc-windows-gnu. llvm-svn: 235733
* [CMake] Fix for PR 23328: LLVM_OPTIMIZED_TABLEGEN brokenChris Bieneman2015-04-241-3/+4
| | | | | | | | | | | | In CMake dependencies can be filenames or targets, and targets can't be filenames. The Ninja generator handles filename dependencies because it generates targets for every output file from a command. For example: add_custom_command(OUTPUT foo.txt COMMAND touch foo.txt) With the Ninja generator this generates a target foo.txt, but with the Makefile generator it doesn't. This is probably because Ninja explicitly requires these hard dependency ties, and Make just behaves oddly in general. To fix this we need to make the tablegen actions depend on a target rather than a filename. llvm-svn: 235732
* Linker: Update -override testcase to check callersDuncan P. N. Exon Smith2015-04-241-11/+13
| | | | | | | | Check that `@main` is calling `@foo2` (the renamed internal function), not the `@foo` with external linkage that's been pulled in from the override file. llvm-svn: 235730
* Switch lowering: fix APInt overflow causing infinite loop / OOMHans Wennborg2015-04-242-1/+65
| | | | llvm-svn: 235729
* [WinEH] Split the landingpad BB instead of cloning itReid Kleckner2015-04-247-29/+17
| | | | | | | This means we don't have to RAUW the landingpad instruction and landingpad BB, which is a nice win. llvm-svn: 235725
* Fix typo in comment.Diego Novillo2015-04-241-1/+1
| | | | llvm-svn: 235723
* Use the cleaner syntx value initialization to zero initialize POD structs.Yaron Keren2015-04-241-6/+3
| | | | | | Suggestion from David Blaikie! llvm-svn: 235721
* Silence clang warning: private field 'data_' is not used.Yaron Keren2015-04-242-0/+4
| | | | llvm-svn: 235720
* Silence clang warning: missing field 'Dr0' initializer.Yaron Keren2015-04-241-1/+2
| | | | llvm-svn: 235719
OpenPOWER on IntegriCloud