summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* test commit.Paul Redmond2012-12-091-1/+1
| | | | llvm-svn: 169709
* Use m_OneUse pattern instead of hasOneUse() method.Jakub Staszak2012-12-091-7/+4
| | | | | | No functionality change. llvm-svn: 169703
* Remove trailing spaces.Jakub Staszak2012-12-091-80/+80
| | | | llvm-svn: 169701
* Switch SROA to pop Uses off the back of its visitors' queues.Chandler Carruth2012-12-091-10/+8
| | | | | | | | This will more closely match the behavior of the new PtrUseVisitor that I am adding. Hopefully this will not change the actual behavior in any way, but by making the processing order more similar help in debugging. llvm-svn: 169697
* Remove extra blank line.Craig Topper2012-12-091-1/+0
| | | | llvm-svn: 169692
* - Re-enable population count loop idiom recognization Shuxin Yang2012-12-094-20/+536
| | | | | | | - fix a bug which cause sigfault. - add two testing cases which was causing crash llvm-svn: 169687
* Teach DAG combine to handle vector logical operations with vectors of all 1s ↵Craig Topper2012-12-081-0/+30
| | | | | | or all 0s. These cases can show up when vectors are split for legalizing. Fix some tests that were dependent on these cases not being combined. llvm-svn: 169684
* Revert the patches adding a popcount loop idiom recognition pass.Chandler Carruth2012-12-084-533/+20
| | | | | | | | | | | | | | There are still bugs in this pass, as well as other issues that are being worked on, but the bugs are crashers that occur pretty easily in the wild. Test cases have been sent to the original commit's review thread. This reverts the commits: r169671: Fix a logic error. r169604: Move the popcnt tests to an X86 subdirectory. r168931: Initial commit adding the pass. llvm-svn: 169683
* Simplify code. Sort includes. No functionality change.Benjamin Kramer2012-12-081-6/+6
| | | | llvm-svn: 169676
* Fix an inadvertent typo error.Shuxin Yang2012-12-081-1/+1
| | | | llvm-svn: 169671
* Fix a use-after-free bug found by ASan. You can't assign a temporaryChandler Carruth2012-12-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::string to a StringRef. Moreover, the method being called accepts a Twine to simplify these patterns. Fixes this ASan failure: ==6312== ERROR: AddressSanitizer: heap-use-after-free on address 0x7fd558b1af58 at pc 0xcb7529 bp 0x7fffff572080 sp 0x7fffff572078 READ of size 1 at 0x7fd558b1af58 thread T0 #0 0xcb7528 .../llvm/include/llvm/ADT/StringRef.h:192 llvm::StringRef::operator[]() #1 0x1d53c0a .../llvm/include/llvm/ADT/StringExtras.h:128 llvm::HashString() #2 0x1d53878 .../llvm/lib/Support/StringMap.cpp:64 llvm::StringMapImpl::LookupBucketFor() #3 0x1b6872f .../llvm/include/llvm/ADT/StringMap.h:352 llvm::StringMap<>::GetOrCreateValue<>() #4 0x1b61836 .../llvm/lib/MC/MCContext.cpp:109 llvm::MCContext::GetOrCreateSymbol() #5 0xe9fd47 .../llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp:154 (anonymous namespace)::ARMELFStreamer::EmitMappingSymbol() #6 0xea01dd .../llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp:133 (anonymous namespace)::ARMELFStreamer::EmitDataMappingSymbol() #7 0xe9f78b .../llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp:91 (anonymous namespace)::ARMELFStreamer::EmitBytes() #8 0x1b15d82 .../llvm/lib/MC/MCStreamer.cpp:89 llvm::MCStreamer::EmitIntValue() #9 0xcc0f9b .../llvm/lib/Target/ARM/ARMAsmPrinter.cpp:713 llvm::ARMAsmPrinter::emitAttributes() #10 0xcc0d44 .../llvm/lib/Target/ARM/ARMAsmPrinter.cpp:632 llvm::ARMAsmPrinter::EmitStartOfAsmFile() #11 0x14692ad .../llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:162 llvm::AsmPrinter::doInitialization() #12 0x1bc4677 .../llvm/lib/VMCore/PassManager.cpp:1561 llvm::FPPassManager::doInitialization() #13 0x1bc4990 .../llvm/lib/VMCore/PassManager.cpp:1595 llvm::MPPassManager::runOnModule() #14 0x1bc55e5 .../llvm/lib/VMCore/PassManager.cpp:1705 llvm::PassManagerImpl::run() #15 0x1bc5878 .../llvm/lib/VMCore/PassManager.cpp:1740 llvm::PassManager::run() #16 0xc3954d .../llvm/tools/llc/llc.cpp:378 compileModule() #17 0xc38001 .../llvm/tools/llc/llc.cpp:194 main #18 0x7fd557d6a11c __libc_start_main 0x7fd558b1af58 is located 24 bytes inside of 29-byte region [0x7fd558b1af40,0x7fd558b1af5d) freed by thread T0 here: #0 0xc337da .../llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:56 operator delete() #1 0x1ee9cef .../libstdc++-v3/include/bits/basic_string.h:535 std::string::~string() #2 0xea01dd .../llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp:133 (anonymous namespace)::ARMELFStreamer::EmitDataMappingSymbol() #3 0xe9f78b .../llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp:91 (anonymous namespace)::ARMELFStreamer::EmitBytes() #4 0x1b15d82 .../llvm/lib/MC/MCStreamer.cpp:89 llvm::MCStreamer::EmitIntValue() #5 0xcc0f9b .../llvm/lib/Target/ARM/ARMAsmPrinter.cpp:713 llvm::ARMAsmPrinter::emitAttributes() #6 0xcc0d44 .../llvm/lib/Target/ARM/ARMAsmPrinter.cpp:632 llvm::ARMAsmPrinter::EmitStartOfAsmFile() #7 0x14692ad .../llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:162 llvm::AsmPrinter::doInitialization() #8 0x1bc4677 .../llvm/lib/VMCore/PassManager.cpp:1561 llvm::FPPassManager::doInitialization() #9 0x1bc4990 .../llvm/lib/VMCore/PassManager.cpp:1595 llvm::MPPassManager::runOnModule() #10 0x1bc55e5 .../llvm/lib/VMCore/PassManager.cpp:1705 llvm::PassManagerImpl::run() #11 0x1bc5878 .../llvm/lib/VMCore/PassManager.cpp:1740 llvm::PassManager::run() #12 0xc3954d .../llvm/tools/llc/llc.cpp:378 compileModule() #13 0xc38001 .../llvm/tools/llc/llc.cpp:194 main #14 0x7fd557d6a11c __libc_start_main llvm-svn: 169668
* Add C API for specifying CPU to the disassembler.Jim Grosbach2012-12-071-9/+16
| | | | | | | | | It was a nasty oversight that we didn't include this when we added this API in the first place. Blech. rdar://12839439 llvm-svn: 169653
* s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling2012-12-0729-161/+161
| | | | | | in the near future. llvm-svn: 169651
* Make the contents of encoded sections SmallVector<char, N> instead ofEli Bendersky2012-12-072-9/+9
| | | | | | | | | | | SmallString. This makes it possible to use the length-erased SmallVectorImpl in the interface without imposing buffer size. Thus, the size of MCInstFragment is back down since a preallocated 8-byte contents buffer is enough. It would be generally a good idea to rid all the fragments of SmallString as contents, because a vector just makes more sense. llvm-svn: 169644
* When we use the BLEND instruction that uses the MSB as a mask, we can removeNadav Rotem2012-12-071-1/+6
| | | | | | | | the VSRI instruction before it since it does not affect the MSB. Thanks Craig Topper for suggesting this. llvm-svn: 169638
* In hexagon convertToHardwareLoop, don't deref end() iteratorMatthew Curtis2012-12-071-7/+14
| | | | | | | | | | In particular, check if MachineBasicBlock::iterator is end() before using it to call getDebugLoc(); See also this thread on llvm-commits: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121112/155914.html llvm-svn: 169634
* Refactor MCInstFragment and MCDataFragment to adhere to a common interface,Eli Bendersky2012-12-076-54/+52
| | | | | | | | | which removes code duplication and prepares the ground for future additions. Full discussion: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121203/158233.html llvm-svn: 169626
* X86: Prefer using VPSHUFD over VPERMIL because it has better throughput.Nadav Rotem2012-12-071-3/+4
| | | | llvm-svn: 169624
* Add separate statistics for Data and Inst fragments emitted during relaxation.Eli Bendersky2012-12-071-1/+5
| | | | | | | Also fixes a test that was overly-sensitive to the exact order of statistics emitted. llvm-svn: 169619
* Some common functionality from WinCOFFStreamer::EmitAssignment can be nowEli Bendersky2012-12-071-3/+1
| | | | | | delegated to MCObjectStreamer. llvm-svn: 169617
* Lift EmitAssignment into MCObjectStreamer which gets rid of at least threeEli Bendersky2012-12-075-28/+5
| | | | | | duplicate implementations in format-specific streamers. llvm-svn: 169613
* Added Mapping Symbols for ARM ELFTim Northover2012-12-078-55/+241
| | | | | | | | | | Before this patch, when you objdump an LLVM-compiled file, objdump tried to decode data-in-code sections as if they were code. This patch adds the missing Mapping Symbols, as defined by "ELF for the ARM Architecture" (ARM IHI 0044D). Patch based on work by Greg Fitzgerald. llvm-svn: 169609
* Split MCELFStreamer into a header file.Logan Chien2012-12-071-107/+63
| | | | llvm-svn: 169603
* [msan] Remove readonly/readnone attributes from all called functions.Evgeniy Stepanov2012-12-071-0/+13
| | | | | | | | | | MSan uses a TLS slot to pass shadow for function arguments and return values. This makes all instrumented functions not readonly, and at the same time requires that all callees of an instrumented function that may be MSan-instrumented do not have readonly attribute (otherwise some of the instrumentation may be optimized out). llvm-svn: 169591
* Use the new MIBundleBuilder class in the Mips target.Jakob Stoklund Olesen2012-12-072-18/+26
| | | | | | This is the preferred way of creating bundled machine instructions. llvm-svn: 169585
* Add higher-level API for dealing with bundled MachineInstrs.Jakob Stoklund Olesen2012-12-071-0/+32
| | | | | | | | | | | | | | | | | | | | | This is still a work in progress. The purpose is to make bundling and unbundling operations explicit, and to catch errors where bundles are broken or created inadvertently. The old IsInsideBundle flag is replaced by two MI flags: BundledPred which has the same meaning as IsInsideBundle, and BundledSucc which is set on instructions that are bundled with a successor. Having two flags provdes redundancy to detect when a bundle is inadvertently torn by a splice() or insert(), and it makes it possible to write bundle iterators that don't need to peek at adjacent instructions. The new flags can't be manipulated directly (once setIsInsideBundle is gone). Instead there are MI functions to make and break bundle bonds. The setIsInsideBundle function will be removed in a future commit. It should be replaced by bundleWithPred(). llvm-svn: 169583
* [mips] Delete nodes and instructions for dynamic alloca that are no longer inAkira Hatanaka2012-12-073-23/+0
| | | | | | use. llvm-svn: 169580
* [mips] Shorten predicate name.Akira Hatanaka2012-12-075-105/+105
| | | | llvm-svn: 169579
* [mips] Delete unused sub-target features.Akira Hatanaka2012-12-073-15/+2
| | | | llvm-svn: 169578
* [mips] Remove unnecessary predicates.Akira Hatanaka2012-12-073-4/+4
| | | | llvm-svn: 169577
* Add support to ValueTracking for determining that a pointer is non-nullChandler Carruth2012-12-071-0/+73
| | | | | | | | | | | | | | | | | | | | | | | by virtue of inbounds GEPs that preclude a null pointer. This is a very common pattern in the code generated by std::vector and other standard library routines which use allocators that test for null pervasively. This is one step closer to teaching Clang+LLVM to be able to produce an empty function for: void f() { std::vector<int> v; v.push_back(1); v.push_back(2); v.push_back(3); v.push_back(4); } Which is related to getting them to completely fold SmallVector push_back sequences into constants when inlining and other optimizations make that a possibility. llvm-svn: 169573
* Add a 'using' declaration to suppress GCC's -Woverloaded-virtual while weMatt Beaumont-Gay2012-12-061-0/+1
| | | | | | decide what pattern we want to follow in the future. llvm-svn: 169561
* fixed valgrind issues of prior commit, this change applies r169456 changes ↵Pedro Artigas2012-12-062-9/+48
| | | | | | | | | | | | back to the tree with fixes. on darwin no valgrind issues exist in the tests that used to fail. original change description: change MCContext to work on the doInitialization/doFinalization model reviewed by Evan Cheng <evan.cheng@apple.com> llvm-svn: 169553
* Remove unused field.Jakub Staszak2012-12-061-6/+1
| | | | llvm-svn: 169551
* Remove trailing spaces.Jakub Staszak2012-12-061-25/+25
| | | | llvm-svn: 169550
* Replace r169459 with something safer. Rather than having computeMaskedBits toEvan Cheng2012-12-067-101/+58
| | | | | | | | | | understand target implementation of any_extend / extload, just generate zero_extend in place of any_extend for liveouts when the target knows the zero_extend will be implicit (e.g. ARM ldrb / ldrh) or folded (e.g. x86 movz). rdar://12771555 llvm-svn: 169536
* Remove unneeded function, since PR8156 was fixed over a year ago.Jakub Staszak2012-12-061-18/+1
| | | | llvm-svn: 169534
* Simplify code.Jakub Staszak2012-12-061-3/+1
| | | | llvm-svn: 169521
* Fix a bug in the code that merges consecutive stores. Previously we did notNadav Rotem2012-12-061-10/+14
| | | | | | | check if loads that happen in between stores alias with the first store in the chain, only with the second store onwards. llvm-svn: 169516
* MemorySanitizer.cpp: Suppress a warning. [-Wunused-variable]NAKAMURA Takumi2012-12-061-0/+1
| | | | llvm-svn: 169504
* [msan] Fix a typo in a comment.Evgeniy Stepanov2012-12-061-1/+1
| | | | llvm-svn: 169491
* [msan] Do not store origin for clean values.Evgeniy Stepanov2012-12-061-17/+57
| | | | | | | | | | | | | | | | | | Instead of unconditionally storing origin with every application store, only do this when the shadow of the stored value is != 0. This change also delays instrumentation of stores until after the walk over function's instructions, because adding new basic blocks confuses InstVisitor. We only keep 1 origin value per 4 bytes of application memory. This change fixes the bug when a store of a single clean byte wiped the origin for the whole 4-byte area. Since stores of uninitialized values are relatively uncommon, this change improves performance of track-origins mode by 5% median and by up to 47% on specs. llvm-svn: 169490
* s/getLowerBoundDefault/getDefaultLowerBound/ for consistency. Also put the ↵Bill Wendling2012-12-062-5/+7
| | | | | | more natural check first in the if-then statement. llvm-svn: 169486
* Handle non-default array bounds.Bill Wendling2012-12-062-14/+59
| | | | | | | | | Some languages, e.g. Ada and Pascal, allow you to specify that the array bounds are different from the default (1 in these cases). If we have a lower bound that's non-default, then we emit the lower bound. We also calculate the correct upper bound in those cases. llvm-svn: 169484
* Remove intrinsic specific instructions for (V)MOVQUmr with patterns pointing ↵Craig Topper2012-12-061-13/+5
| | | | | | to the normal instructions. llvm-svn: 169482
* Mark MOVDQ(A/U)rm as ReMaterializable. Mark all MOVDQ(A/U) instructions as ↵Craig Topper2012-12-062-4/+9
| | | | | | neverHasSideEffects. llvm-svn: 169477
* Revert r169456, "change MCContext to work on the ↵NAKAMURA Takumi2012-12-062-36/+6
| | | | | | | | doInitialization/doFinalization model" It broke many builders. llvm-svn: 169462
* [arm fast-isel] Make the fast-isel implementation of memcpy respect alignment.Chad Rosier2012-12-061-11/+22
| | | | | | rdar://12821569 llvm-svn: 169460
* Let targets provide hooks that compute known zero and ones for any_extendEvan Cheng2012-12-066-7/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and extload's. If they are implemented as zero-extend, or implicitly zero-extend, then this can enable more demanded bits optimizations. e.g. define void @foo(i16* %ptr, i32 %a) nounwind { entry: %tmp1 = icmp ult i32 %a, 100 br i1 %tmp1, label %bb1, label %bb2 bb1: %tmp2 = load i16* %ptr, align 2 br label %bb2 bb2: %tmp3 = phi i16 [ 0, %entry ], [ %tmp2, %bb1 ] %cmp = icmp ult i16 %tmp3, 24 br i1 %cmp, label %bb3, label %exit bb3: call void @bar() nounwind br label %exit exit: ret void } This compiles to the followings before: push {lr} mov r2, #0 cmp r1, #99 bhi LBB0_2 @ BB#1: @ %bb1 ldrh r2, [r0] LBB0_2: @ %bb2 uxth r0, r2 cmp r0, #23 bhi LBB0_4 @ BB#3: @ %bb3 bl _bar LBB0_4: @ %exit pop {lr} bx lr The uxth is not needed since ldrh implicitly zero-extend the high bits. With this change it's eliminated. rdar://12771555 llvm-svn: 169459
* change MCContext to work on the doInitialization/doFinalization modelPedro Artigas2012-12-062-6/+36
| | | | | | reviewed by Evan Cheng <evan.cheng@apple.com> llvm-svn: 169456
OpenPOWER on IntegriCloud