aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Use multiclass to define store instructions with base+immediate offsetJyotsna Verma2012-12-051-138/+68
| | | | | | | | addressing mode and immediate stored value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169408 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust JIT target triple on OS X to match the current architecture.Bob Wilson2012-12-051-1/+11
| | | | | | | | | For OS X builds, we generate one version of config.h but then build for multiple architectures. This means that the LLVM_HOSTTRIPLE setting may have the wrong architecture. Adjust it dynamically to match the current architecture. <rdar://problem/12715470> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169405 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix misplaced closing brace.Matthew Curtis2012-12-051-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169404 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to unbreak the build on hosts that don't transitively pull in a ↵Benjamin Kramer2012-12-051-2/+2
| | | | | | | | definition for int64_t. Also use the portable (ugly) format string macros, for MSVC compatibility. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169396 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused MachineInstr constructors.Jakob Stoklund Olesen2012-12-051-27/+0
| | | | | | | | A MachineInstr can only ever be constructed by CreateMachineInstr() and CloneMachineInstr(), and those factories don't use the removed constructors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169395 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a option to the disassembler to print immediates as hex.Kevin Enderby2012-12-054-11/+26
| | | | | | | | | | | | | | | | | | | | | | This is for the lldb team so most of but not all of the values are to be printed as hex with this option. Some small values like the scale in an X86 address were requested to printed in decimal without the leading 0x. There may be some tweaks need to places that may still be in decimal that they want in hex. Specially for arm. I made my best guess. Any tweaks from here should be simple. I also did the best I know now with help from the C++ gurus creating the cleanest formatImm() utility function and containing the changes. But if someone has a better idea to make something cleaner I'm all ears and game for changing the implementation. rdar://8109283 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169393 91177308-0d34-0410-b5e6-96231b3b80d8
* - Added calls to doInitialization/doFinalization to immutable passesPedro Artigas2012-12-052-15/+52
| | | | | | | | | | | - fixed ordering of calls to doFinalization to be the reverse of the pass run order due to potential dependencies - fixed machine module info to operate in the doInitialization/doFinalization model, also fixes some FIXMEs reviewed by Evan Cheng <evan.cheng@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169391 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Instrument bswap intrinsic.Evgeniy Stepanov2012-12-051-6/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169383 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Initialize callbacks in runOnFunction as opposed to doInitialization.Evgeniy Stepanov2012-12-051-37/+49
| | | | | | | This mirrors the change in ASan & TSan done in r168864. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169378 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Change linkage type of __msan_track_origins.Evgeniy Stepanov2012-12-051-1/+1
| | | | | | | | LinkOnceODRLinkage globals may be removed in GlobalOpt if not used in the current module. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169377 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplified BLEND pattern matching for shuffles.Elena Demikhovsky2012-12-054-78/+68
| | | | | | Generate VPBLENDD for AVX2 and VPBLENDW for v16i16 type on AVX2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169366 91177308-0d34-0410-b5e6-96231b3b80d8
* Added RegisterPressureTracker::dump() for debugging.Andrew Trick2012-12-051-5/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169359 91177308-0d34-0410-b5e6-96231b3b80d8
* Copy clang/Driver/<Option parsing stuff> to llvm.Michael J. Spencer2012-12-0510-2/+1148
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169344 91177308-0d34-0410-b5e6-96231b3b80d8
* Add x86 isel lowering logic to form bit test with inverted condition. e.g.Evan Cheng2012-12-051-6/+17
| | | | | | | | | | x ^ -1. Patch by David Majnemer. rdar://12755626 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169339 91177308-0d34-0410-b5e6-96231b3b80d8
* Appease GCC's -Wparentheses.Matt Beaumont-Gay2012-12-041-2/+2
| | | | | | (TIL that Clang's -Wparentheses ignores 'x || y && "foo"' on purpose. Neat.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169337 91177308-0d34-0410-b5e6-96231b3b80d8
* Split up the ParseOptionalAttrs method into three different methods for eachBill Wendling2012-12-042-81/+122
| | | | | | | | class of attributes. This makes it much easier to check for errors and to reuse the code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169336 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopVectorizer: Increase the number of pointers that can be tested at ↵Nadav Rotem2012-12-041-1/+1
| | | | | | runtime. If we cant prove statically that the pointers are disjoint then we add the runtime check. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169334 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable if-conversion during vectorization.Nadav Rotem2012-12-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169331 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM custom lower ctpop for vector types. Patch by Pete Couperus.Evan Cheng2012-12-041-0/+117
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169325 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in vectorization of if-converted reduction variables. If theNadav Rotem2012-12-041-14/+20
| | | | | | | | | reduction variable is not used outside the loop then we ran into an endless loop. This change checks if we found the original PHI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169324 91177308-0d34-0410-b5e6-96231b3b80d8
* Speed up the AllocationOrder class a bit.Jakob Stoklund Olesen2012-12-043-25/+19
| | | | | | | Allow the central functions to be inlined, and use the argumentless isHint() function when possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169319 91177308-0d34-0410-b5e6-96231b3b80d8
* For rdar://12329730, last piece.Shuxin Yang2012-12-041-1/+14
| | | | | | | | | | | | | | | | | | | | | | This change attempts to simplify (X^Y) -> X or Y in the user's context if we know that only bits from X or Y are demanded. A minimized case is provided bellow. This change will simplify "t>>16" into "var1 >>16". ============================================================= unsigned foo (unsigned val1, unsigned val2) { unsigned t = val1 ^ 1234; return (t >> 16) | t; // NOTE: t is used more than once. } ============================================================= Note that if the "t" were used only once, the expression would be finally optimized as well. However, with with this change, the optimization will take place earlier. Reviewed by Nadav, Thanks a lot! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169317 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment change made in r169304 as requested by Eric Christopher.David Blaikie2012-12-041-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169315 91177308-0d34-0410-b5e6-96231b3b80d8
* Define store instructions with base+register offset addressing modeJyotsna Verma2012-12-041-352/+116
| | | | | | | | using multiclass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169314 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the 'count' attribute to calculate the upper bound of an array.Bill Wendling2012-12-043-17/+20
| | | | | | | | | | The count attribute is more accurate with regards to the size of an array. It also obviates the upper bound attribute in the subrange. We can also better handle an unbound array by setting the count to -1 instead of the lower bound to 1 and upper bound to 0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169312 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r160148 (reverted in r163570) fixing spurious breakpoints in modern GDBDavid Blaikie2012-12-041-1/+1
| | | | | | | | | | | | | | | | | This reapplies the fix for PR13303 now with more justification. Based on my execution of the GDB 7.5 test suite this results in: expected passes: 16101 -> 20890 (+30%) unexpected failures: 4826 -> 637 (-77%) There are 23 checks that used to pass and now fail. They are all in gdb.reverse. Investigating a few looks like they were accidentally passing due to extra breakpoints being set by this bug. They're generally due to the difference in end location between gcc and clang, the test suite is trying to set breakpoints on the closing '}' that clang doesn't associate with any instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169304 91177308-0d34-0410-b5e6-96231b3b80d8
* Make NaCl naming consistent. The triple OSType is called NaCl and is representedEli Bendersky2012-12-043-4/+4
| | | | | | | | | | | textually as NativeClient. Also added a link to the native client project for readers unfamiliar with it. A Clang patch will follow shortly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169291 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for reduction variables when IF-conversion is enabled. Nadav Rotem2012-12-041-10/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169288 91177308-0d34-0410-b5e6-96231b3b80d8
* Add patterns to define 'combine', 'tstbit', 'ct0/cl0' (count ↵Jyotsna Verma2012-12-043-17/+97
| | | | | | | | | | trailing/leading zeros) instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169287 91177308-0d34-0410-b5e6-96231b3b80d8
* Add constant extender support to ALU32 instructions for V2.Jyotsna Verma2012-12-041-51/+79
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169284 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch introduces initial-exec model support for thread-local storageBill Schmidt2012-12-0414-15/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on 64-bit PowerPC ELF. The patch includes code to handle external assembly and MC output with the integrated assembler. It intentionally does not support the "old" JIT. For the initial-exec TLS model, the ABI requires the following to calculate the address of external thread-local variable x: Code sequence Relocation Symbol ld 9,x@got@tprel(2) R_PPC64_GOT_TPREL16_DS x add 9,9,x@tls R_PPC64_TLS x The register 9 is arbitrary here. The linker will replace x@got@tprel with the offset relative to the thread pointer to the generated GOT entry for symbol x. It will replace x@tls with the thread-pointer register (13). The two test cases verify correct assembly output and relocation output as just described. PowerPC-specific selection node variants are added for the two instructions above: LD_GOT_TPREL and ADD_TLS. These are inserted when an initial-exec global variable is encountered by PPCTargetLowering::LowerGlobalTLSAddress(), and later lowered to machine instructions LDgotTPREL and ADD8TLS. LDgotTPREL is a pseudo that uses the same LDrs support added for medium code model's LDtocL, with a different relocation type. The rest of the processing is straightforward. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169281 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort includes for all of the .h files under the 'lib' tree. These wereChandler Carruth2012-12-0484-173/+170
| | | | | | | | | | missed in the first pass because the script didn't yet handle include guards. Note that the script is now able to handle all of these headers without manual edits. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169224 91177308-0d34-0410-b5e6-96231b3b80d8
* Give scalar if-converted blocks half the score because they are not always ↵Nadav Rotem2012-12-041-5/+5
| | | | | | executed due to CF. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169223 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment about the requirement that the Windows.h header be last.Chandler Carruth2012-12-041-0/+2
| | | | | | | This comment has the dual effect of blocking reorderings with the sort_include script. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169221 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a 'count' field to the DWARF subrange.Bill Wendling2012-12-042-3/+7
| | | | | | | | | | The count field is necessary because there isn't a difference between the 'lo' and 'hi' attributes for a one-element array and a zero-element array. When the count is '0', we know that this is a zero-element array. When it's >=1, then it's a normal constant sized array. When it's -1, then the array is unbounded. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169218 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the last part that is needed for vectorization of if-converted code.Nadav Rotem2012-12-041-162/+251
| | | | | | | | | | | | | | | | | | | Added the code that actually performs the if-conversion during vectorization. We can now vectorize this code: for (int i=0; i<n; ++i) { unsigned k = 0; if (a[i] > b[i]) <------ IF inside the loop. k = k * 5 + 3; a[i] = k; <---- K is a phi node that becomes vector-select. } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169217 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] add experimental -asan-realign-stack option (true by default, which ↵Kostya Serebryany2012-12-041-2/+7
| | | | | | does not change the current behavior) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169216 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 'using' declarations to suppress -Woverloaded-virtual warnings.Matt Beaumont-Gay2012-12-043-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169214 91177308-0d34-0410-b5e6-96231b3b80d8
* Move all operand definitions into HexagonOperands.tdJyotsna Verma2012-12-042-53/+57
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169213 91177308-0d34-0410-b5e6-96231b3b80d8
* Move generic Hexagon subtarget information into Hexagon.tdJyotsna Verma2012-12-042-64/+101
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169212 91177308-0d34-0410-b5e6-96231b3b80d8
* rdar://12329730 (2nd part, revised)Shuxin Yang2012-12-041-1/+2
| | | | | | | | The type of shirt-right (logical or arithemetic) should remain unchanged when transforming "X << C1 >> C2" into "X << (C1-C2)" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169209 91177308-0d34-0410-b5e6-96231b3b80d8
* ASan: add initial support for handling llvm.lifetime intrinsics in ASan - ↵Alexey Samsonov2012-12-041-3/+108
| | | | | | emit calls into runtime library that poison memory for local variables when their lifetime is over and unpoison memory when their lifetime begins. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169200 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code. No functionality change.Jakub Staszak2012-12-041-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169198 91177308-0d34-0410-b5e6-96231b3b80d8
* Stack Alignment: when creating stack objects in MachineFrameInfo, make sureManman Ren2012-12-041-1/+24
| | | | | | | | | | | | | | | | | the alignment is clamped to TargetFrameLowering.getStackAlignment if the target does not support stack realignment or the option "realign-stack" is off. This will cause miscompile if the address is treated as aligned and add is replaced with or in DAGCombine. Added a bool StackRealignable to TargetFrameLowering to check whether stack realignment is implemented for the target. Also added a bool RealignOption to MachineFrameInfo to check whether the option "realign-stack" is on. rdar://12713765 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169197 91177308-0d34-0410-b5e6-96231b3b80d8
* Use dyn_cast instead of isa and cast. No functionality change.Jakub Staszak2012-12-041-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169196 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopVectorize.cpp: Suppress a warning. [-Wunused-variable]NAKAMURA Takumi2012-12-041-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169195 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix whitespace.NAKAMURA Takumi2012-12-041-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169194 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the old TRI::ResolveRegAllocHint() and getRawAllocationOrder() hooks.Jakob Stoklund Olesen2012-12-042-270/+0
| | | | | | | These functions have been replaced by TRI::getRegAllocationHints() which provides the same capabilities. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169192 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove VirtRegMap::getRegAllocPref().Jakob Stoklund Olesen2012-12-041-11/+0
| | | | | | | Now that there can be multiple hint registers from targets, it doesn't make sense to have a function that returns 'the' preferred register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169190 91177308-0d34-0410-b5e6-96231b3b80d8
* Use MRI::getSimpleHint() instead of getRegAllocPref() in remaining cases.Jakob Stoklund Olesen2012-12-042-1/+10
| | | | | | | | | Targets can provide multiple hints now, so getRegAllocPref() doesn't make sense any longer because it only returns one preferred register. Replace it with getSimpleHint() in the remaining heuristics. This function only git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169188 91177308-0d34-0410-b5e6-96231b3b80d8