- Dec 10, 2012
-
-
Bill Wendling authored
The linker will call `lto_codegen_add_must_preserve_symbol' on all globals that should be kept around. The linker will pretend that a dylib is being created. <rdar://problem/12528059> llvm-svn: 169770
-
Eli Bendersky authored
llvm-svn: 169762
-
Bill Wendling authored
The `-mno-red-zone' flag wasn't being propagated to the functions that code coverage generates. This allowed some of them to use the red zone when that wasn't allowed. <rdar://problem/12843084> llvm-svn: 169754
-
Sean Silva authored
PR14343 llvm-svn: 169742
-
Chandler Carruth authored
This visitor provides infrastructure for recursively traversing the use-graph of a pointer-producing instruction like an alloca or a malloc. It maintains a worklist of uses to visit, so it can handle very deep recursions. It automatically looks through instructions which simply translate one pointer to another (bitcasts and GEPs). It tracks the offset relative to the original pointer as long as that offset remains constant and exposes it during the visit as an APInt offset. Finally, it performs conservative escape analysis. However, currently it has some limitations that should be addressed going forward: 1) It doesn't handle vectors of pointers. 2) It doesn't provide a cheaper visitor when the constant offset tracking isn't needed. 3) It doesn't support non-instruction pointer values. The current functionality is exactly what is required to implement the SROA pointer-use visitors in terms of this one, rather than in terms of their own ad-hoc base visitor, which was always very poorly specified. SROA has been converted to use this, and the code there deleted which this utility now provides. Technically speaking, using this new visitor allows SROA to handle a few more cases than it previously did. It is now more aggressive in ignoring chains of instructions which look like they would defeat SROA, but in fact do not because they never result in a read or write of memory. While this is "neat", it shouldn't be interesting for real programs as any such chains should have been removed by others passes long before we get to SROA. As a consequence, I've not added any tests for these features -- it shouldn't be part of SROA's contract to perform such heroics. The goal is to extend the functionality of this visitor going forward, and re-use it from passes like ASan that can benefit from doing a detailed walk of the uses of a pointer. Thanks to Ben Kramer for the code review rounds and lots of help reviewing and debugging this patch. llvm-svn: 169728
-
- Dec 09, 2012
-
-
Michael Ilseman authored
llvm-svn: 169712
-
Paul Redmond authored
- added function to VectorTargetTransformInfo to query cost of intrinsics - vectorize trivially vectorizable intrinsic calls such as sin, cos, log, etc. Reviewed by: Nadav llvm-svn: 169711
-
Michael Ilseman authored
llvm-svn: 169710
-
Shuxin Yang authored
- fix a bug which cause sigfault. - add two testing cases which was causing crash llvm-svn: 169687
-
- Dec 08, 2012
-
-
Chandler Carruth authored
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
-
Logan Chien authored
Windows does not have <stdint.h>, should include "llvm/Support/DataTypes.h" instead. llvm-svn: 169672
-
Bill Wendling authored
This function sets the `_exportDynamic' ivar. When that's set, we export all symbols (e.g. we don't run the internalize pass). This is equivalent to the `--export-dynamic' linker flag in GNU land: --export-dynamic When creating a dynamically linked executable, add all symbols to the dynamic symbol table. The dynamic symbol table is the set of symbols which are visible from dynamic objects at run time. If you do not use this option, the dynamic symbol table will normally contain only those symbols which are referenced by some dynamic object mentioned in the link. If you use dlopen to load a dynamic object which needs to refer back to the symbols defined by the program, rather than some other dynamic object, then you will probably need to use this option when linking the program itself. The Darwin linker will support this via the `-export_dynamic' flag. We should modify clang to support this via the `-rdynamic' flag. llvm-svn: 169656
-
Jim Grosbach authored
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
-
Bill Wendling authored
llvm-svn: 169651
-
- Dec 07, 2012
-
-
Eli Bendersky authored
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
-
Michael Ilseman authored
llvm-svn: 169637
-
Ted Kremenek authored
llvm-svn: 169629
-
Eli Bendersky authored
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
-
Eli Bendersky authored
duplicate implementations in format-specific streamers. llvm-svn: 169613
-
Tim Northover authored
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
-
Logan Chien authored
llvm-svn: 169603
-
Jakob Stoklund Olesen authored
Like the MachineInstrBuilder, this class makes it easier to build bundles of MachineInstrs. llvm-svn: 169584
-
Jakob Stoklund Olesen authored
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
-
Ted Kremenek authored
llvm-svn: 169572
-
Eli Bendersky authored
llvm-svn: 169565
-
- Dec 06, 2012
-
-
Pedro Artigas authored
fixed valgrind issues of prior commit, this change applies r169456 changes 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
-
Ted Kremenek authored
Jordan and I discussed this, and we don't want this in the API. llvm-svn: 169541
-
Evan Cheng authored
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
-
Jordan Rose authored
This is an alternative to the ImmutableMapRef interface where a factory should still be canonicalizing by default, but in certain cases an improvement can be made by delaying the canonicalization. llvm-svn: 169532
-
Bill Wendling authored
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
-
NAKAMURA Takumi authored
It broke many builders. llvm-svn: 169462
-
Evan Cheng authored
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
-
Pedro Artigas authored
change MCContext to work on the doInitialization/doFinalization model reviewed by Evan Cheng <evan.cheng@apple.com> llvm-svn: 169456
-
Andrew Trick authored
llvm-svn: 169443
-
- Dec 05, 2012
-
-
Eli Bendersky authored
This is more consistent with other vectors in this code. In addition, I ran some tests compiling a large program and >96% of fragments have 4 or less fixups, so SmallVector<4> is a good optimization. llvm-svn: 169433
-
Andrew Trick authored
Now that live register units are tracked individually, the code can be simplified. llvm-svn: 169426
-
Andrew Trick authored
This is much simpler to reason about, more efficient, and fixes some corner cases involving implicit super-register defs. Fixed rdar://12797931. llvm-svn: 169425
-
Eli Bendersky authored
llvm-svn: 169419
-
Michael J. Spencer authored
Change member types of RuntimeFunction and UnwindInfo from uint64_t to uint32_t: These members represent addresses. According to MSDN, they are image relative, that is, they are 32-bit offsets from the starting address of the image that contains the function table entry. See MSDN for more information: RUNTIME_FUNCTION: http://msdn.microsoft.com/en-us/library/ft9x1kdx.aspx UNWIND_INFO: http://msdn.microsoft.com/en-us/library/ddssxxy8.aspx Make Win64.h platform-neutral: The standard types unit8_t, uint16_t and uint32_t are replaced with their counterparts from Endian.h. Accessor functions are introduced to replace bit fields. Patch by João Matos and Kai Nacke. llvm-svn: 169414
-
Eli Bendersky authored
good for enacpsulation anyway. llvm-svn: 169407
-