Dylan Noblesmith [Thu, 2 Feb 2012 00:54:18 +0000 (00:54 +0000)]
autoconf: fix build/src dir confusion
This was the cause of the silent failure to generate
clang's config.h. My bad.
Fix on r149563 / r149568.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149574
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 2 Feb 2012 00:19:05 +0000 (00:19 +0000)]
Regenerate again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149569
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan Noblesmith [Thu, 2 Feb 2012 00:17:33 +0000 (00:17 +0000)]
autoconf: restore old clang-srcdir behavior
Keep the string empty when unspecified. Undoes
part of r149563.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149568
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 2 Feb 2012 00:16:55 +0000 (00:16 +0000)]
Regenerate configure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149567
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan Noblesmith [Thu, 2 Feb 2012 00:11:14 +0000 (00:11 +0000)]
autoconf: honor --with-clang-srcdir
configure was silently failing to produce anything in the case
where clang wasn't at tools/clang/, resulting in compilation
errors much later in the build when config.h didn't exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149563
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 1 Feb 2012 23:43:12 +0000 (23:43 +0000)]
Typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149562
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 1 Feb 2012 23:40:51 +0000 (23:40 +0000)]
Fix the cmake build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149561
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 1 Feb 2012 23:20:51 +0000 (23:20 +0000)]
Instruction scheduling itinerary for Intel Atom.
Adds an instruction itinerary to all x86 instructions, giving each a default latency of 1, using the InstrItinClass IIC_DEFAULT.
Sets specific latencies for Atom for the instructions in files X86InstrCMovSetCC.td, X86InstrArithmetic.td, X86InstrControl.td, and X86InstrShiftRotate.td. The Atom latencies for the remainder of the x86 instructions will be set in subsequent patches.
Adds a test to verify that the scheduler is working.
Also changes the scheduling preference to "Hybrid" for i386 Atom, while leaving x86_64 as ILP.
Patch by Preston Gurd!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149558
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 1 Feb 2012 23:16:43 +0000 (23:16 +0000)]
Move ARM subreg index compositions to the SubRegIndex itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149557
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 1 Feb 2012 23:16:41 +0000 (23:16 +0000)]
Specify SubRegIndex components on the index itself.
It is simpler to define a composite index directly:
def ssub_2 : SubRegIndex<[dsub_1, ssub_0]>;
def ssub_3 : SubRegIndex<[dsub_1, ssub_1]>;
Than specifying the composite indices on each register:
CompositeIndices = [(ssub_2 dsub_1, ssub_0),
(ssub_3 dsub_1, ssub_1)] in ...
This also makes it clear that SubRegIndex composition is supposed to be
unique.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149556
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 1 Feb 2012 22:28:29 +0000 (22:28 +0000)]
fix cmake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149553
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 1 Feb 2012 22:19:26 +0000 (22:19 +0000)]
Fix a bug in the TopoOrderRC comparison function.
The final tie breaker comparison also needs to return +/-1, or 0.
This is not a less() function.
This could cause otherwise identical super-classes to be ordered
unstably, depending on what the system qsort routine does with a bad
compare function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149549
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Wed, 1 Feb 2012 22:15:20 +0000 (22:15 +0000)]
Avoid creating an extract element to an illegal type after LegalizeTypes has run.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149548
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 1 Feb 2012 22:13:57 +0000 (22:13 +0000)]
VLIW specific scheduler framework that utilizes deterministic finite automaton (DFA).
This new scheduler plugs into the existing selection DAG scheduling framework. It is a top-down critical path scheduler that tracks register pressure and uses a DFA for pipeline modeling.
Patch by Sergei Larin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149547
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 1 Feb 2012 22:12:51 +0000 (22:12 +0000)]
Avoid emitting empty arrays, they're not standard C++.
It's only by luck that we haven't produced any yet, and clang refuses to
compile them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149546
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 1 Feb 2012 18:45:51 +0000 (18:45 +0000)]
Tidy up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149521
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan Noblesmith [Wed, 1 Feb 2012 14:49:39 +0000 (14:49 +0000)]
cmake: make BUILD_SHARED_LIBS a visible option
It could only be specified on the commandline, and wouldn't show
up as an option in the GUI or when invoked via `cmake -i` at all.
This also tells CMake that it's a BOOL, rather than "UNINITIALIZED".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149506
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 1 Feb 2012 14:35:29 +0000 (14:35 +0000)]
test/CodeGen/X86/avx-minmax.ll: Relax expressions for Win32 targets. YMM arguments are passed as indirect on Win32 x64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149505
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan Noblesmith [Wed, 1 Feb 2012 14:06:21 +0000 (14:06 +0000)]
autoconf: generate clang's private config.h header
The CMake build already generated one. Follows clang r149497.
This brings us one step closer to compiling and configuring clang
separately from LLVM using the autoconf build, too.
(I lack the right version of autoconf et al. to regen, but it
was a simple change, so I just updated configure manually.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149498
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Wed, 1 Feb 2012 10:46:14 +0000 (10:46 +0000)]
Passing AVX 256-bit structures in Win64 was wrong.
Fixed Win64 calling conventions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149494
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Wed, 1 Feb 2012 10:33:05 +0000 (10:33 +0000)]
Shortened code in shuffle masks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149493
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Wed, 1 Feb 2012 07:56:44 +0000 (07:56 +0000)]
Optimization for "truncate" operation on AVX.
Truncating v4i64 -> v4i32 and v8i32 -> v8i16 may be done with set of shuffles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149485
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Wed, 1 Feb 2012 07:49:51 +0000 (07:49 +0000)]
SwitchInst refactoring.
The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods than SwitchInst ones (TerminatorInst or may be User). After this patch we can reorganize SwitchInst operands and successors as we want.
What was done:
1. Changed semantics of index inside the getCaseValue method:
getCaseValue(0) means "get first case", not a condition. Use getCondition() if you want to resolve the condition. I propose don't mix SwitchInst case indexing with low level indexing (TI successors indexing, User's operands indexing), since it may be dangerous.
2. By the same reason findCaseValue(ConstantInt*) returns actual number of case value. 0 means first case, not default. If there is no case with given value, ErrorIndex will returned.
3. Added getCaseSuccessor method. I propose to avoid usage of TerminatorInst::getSuccessor if you want to resolve case successor BB. Use getCaseSuccessor instead, since internal SwitchInst organization of operands/successors is hidden and may be changed in any moment.
4. Added resolveSuccessorIndex and resolveCaseIndex. The main purpose of these methods is to see how case successors are really mapped in TerminatorInst.
4.1 "resolveSuccessorIndex" was created if you need to level down from SwitchInst to TerminatorInst. It returns TerminatorInst's successor index for given case successor.
4.2 "resolveCaseIndex" converts low level successors index to case index that curresponds to the given successor.
Note: There are also related compatability fix patches for dragonegg, klee, llvm-gcc-4.0, llvm-gcc-4.2, safecode, clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149481
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 1 Feb 2012 07:16:20 +0000 (07:16 +0000)]
Add pass printer passes in the right place.
The pass pointer should never be referenced after sending it to
schedulePass(), which may delete the pass. To fix this bug I had to
clean up the design leading to more goodness.
You may notice now that any non-analysis pass is printed. So things like loop-simplify and lcssa show up, while target lib, target data, alias analysis do not show up. Normally, analysis don't mutate the IR, but you can now check this by using both -print-after and -print-before. The effects of analysis will now show up in between the two.
The llc path is still in bad shape. But I'll be improving it in my next checkin. Meanwhile, print-machineinstrs still works the same way. With print-before/after, many llc passes that were not printed before now are, some of these should be converted to analysis. A few very important passes, isel and scheduler, are not properly initialized, so not printed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149480
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 1 Feb 2012 07:16:17 +0000 (07:16 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149479
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 1 Feb 2012 06:51:58 +0000 (06:51 +0000)]
Don't create VBROADCAST nodes if any nodes use the chain result from the load. Fixes PR11900.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149478
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 1 Feb 2012 06:11:58 +0000 (06:11 +0000)]
BBVectorize.cpp: Try to fix MSVC build. map::iterator and multimap::iterator are incompatible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149475
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 1 Feb 2012 05:51:45 +0000 (05:51 +0000)]
A few of the changes suggested in code review (by Nick Lewycky)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149472
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 1 Feb 2012 04:51:17 +0000 (04:51 +0000)]
Revert Chris' commits up to r149348 that started causing VMCoreTests unit test to fail.
These are:
r149348
r149351
r149352
r149354
r149356
r149357
r149361
r149362
r149364
r149365
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149470
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 1 Feb 2012 03:51:43 +0000 (03:51 +0000)]
Add a basic-block autovectorization pass.
This is the initial checkin of the basic-block autovectorization pass along with some supporting vectorization infrastructure.
Special thanks to everyone who helped review this code over the last several months (especially Tobias Grosser).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149468
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 1 Feb 2012 00:08:17 +0000 (00:08 +0000)]
Disable InstCombine unsafe folding bitcasts of calls w/ varargs.
Changing arguments from being passed as fixed to varargs is unsafe, as
the ABI may require they be handled differently (stack vs. register, for
example).
Remove two tests which rely on the bitcast being folded into the direct
call, which is exactly the transformation that's unsafe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149457
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 31 Jan 2012 23:51:09 +0000 (23:51 +0000)]
Tidy up. One more return type mismatch fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149452
91177308-0d34-0410-b5e6-
96231b3b80d8
Brendon Cahoon [Tue, 31 Jan 2012 23:18:33 +0000 (23:18 +0000)]
Revert test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149446
91177308-0d34-0410-b5e6-
96231b3b80d8
Lenny Maiorani [Tue, 31 Jan 2012 23:14:41 +0000 (23:14 +0000)]
bz11794 : EarlyCSE stack overflow on long functions.
Make the EarlyCSE optimizer not use recursion to do a depth first iteration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149445
91177308-0d34-0410-b5e6-
96231b3b80d8
Brendon Cahoon [Tue, 31 Jan 2012 23:13:42 +0000 (23:13 +0000)]
test commit, adding a blank space
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149444
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 31 Jan 2012 23:02:57 +0000 (23:02 +0000)]
Fixed a crash in llvm-mc for Mach-O when a symbol difference expression uses a
symbol from an assignment. In this case the symbol did not have a fragment so
MCObjectWriter::IsSymbolRefDifferenceFullyResolved() should not have been
calling IsSymbolRefDifferenceFullyResolvedImpl() with a NULL fragment and should
just have returned false in that case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149442
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 31 Jan 2012 22:32:29 +0000 (22:32 +0000)]
Add Triple::getMacOSXVersion to replace crufty code in the clang driver.
This new function provides a way to get the Mac OS X version number from
either generic "darwin" triples of macosx triples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149438
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 31 Jan 2012 21:51:53 +0000 (21:51 +0000)]
Don't assign a value to NUM_TARGET_NAMED_SUBREGS.
It was wrong and completely unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149433
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 31 Jan 2012 21:44:11 +0000 (21:44 +0000)]
Move the composite map into CodeGenSubRegIndex.
Each SubRegIndex keeps track of how it composes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149423
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 31 Jan 2012 20:57:55 +0000 (20:57 +0000)]
Add a TableGen CodeGenSubRegIndex class.
This class is used to represent SubRegIndex instances instead of the raw
Record pointers that were used before.
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149418
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 31 Jan 2012 20:56:55 +0000 (20:56 +0000)]
Refactor loop for better readability.
Excellent suggestion from Ben Kramer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149417
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 31 Jan 2012 20:34:53 +0000 (20:34 +0000)]
Add explanatory comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149416
91177308-0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Tue, 31 Jan 2012 19:58:34 +0000 (19:58 +0000)]
RefCountedBaseVPTR needs the IntrusiveRefCntPtrInfo as friend,
now that this handles the release / retain calls.
Adds a regression test for that bug (which is a compile-time
regression) and for the last two changes to the IntrusiveRefCntPtr,
especially tests for the memory leak due to copy construction of the
ref-counted object and ensuring that the traits are used for release /
retain calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149411
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 31 Jan 2012 19:47:32 +0000 (19:47 +0000)]
Tidy up. Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149408
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 31 Jan 2012 18:54:19 +0000 (18:54 +0000)]
Obvious unnecessary loop removal. Follow through from previous checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149398
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 31 Jan 2012 18:14:05 +0000 (18:14 +0000)]
Add assembler dialect attribute in asm parser which lets target specific asm parser change dialect on the fly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149396
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 31 Jan 2012 17:18:47 +0000 (17:18 +0000)]
Regenerate configure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149391
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Tue, 31 Jan 2012 09:35:01 +0000 (09:35 +0000)]
Fix BrainF compilation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149375
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 07:04:52 +0000 (07:04 +0000)]
Increase the initial vector size to be equivalent to the size of the Deps
vector. This potentially saves a resizing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149369
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 06:57:53 +0000 (06:57 +0000)]
Cache the size of the vector instead of calling .size() all over the place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149368
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 31 Jan 2012 06:52:44 +0000 (06:52 +0000)]
Remove pcmpgt/pcmpeq intrinsics as clang is not using them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149367
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2012 06:18:43 +0000 (06:18 +0000)]
eliminate the "string" form of ConstantArray::get, using
ConstantDataArray::getString instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149365
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2012 06:17:26 +0000 (06:17 +0000)]
remove commented-out code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149364
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2012 06:05:00 +0000 (06:05 +0000)]
with recent changes, ConstantArray is never a "string". Remove the associated
methods and constant fold the clients to false.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149362
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2012 06:03:46 +0000 (06:03 +0000)]
update this to ConstantDataArray. There are no tests and this isn't using the preferred functionality for ripping apart strings, so I have no way to test this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149361
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 31 Jan 2012 05:55:32 +0000 (05:55 +0000)]
RAFast: Generalize the logic for return operands.
This removes implicit assumption about the form of MI coming into regalloc. In particular, it should be independent of ProcessImplicitDefs which will eventually become a standard part of coming out of SSA--unless we simply can eliminate IMPLICIT_DEF completely. Current unit tests expose this once I remove incidental pass ordering restrictions.
This is not a final fix. Just a temporary workaround until I figure out the right way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149360
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2012 05:18:56 +0000 (05:18 +0000)]
fix a small oversight that broke the fhourstones app.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149357
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2012 05:09:17 +0000 (05:09 +0000)]
remove the last vestiges of llvm::GetConstantStringInfo, in CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149356
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2012 04:54:27 +0000 (04:54 +0000)]
eliminate the last uses of GetConstantStringInfo from this file, I didn't realize I was that close...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149354
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 31 Jan 2012 04:52:32 +0000 (04:52 +0000)]
Add various coarse bit-width architecture predicates to llvm::Triple.
These are very useful for frontends and other utilities reasoning about
or selecting between triples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149353
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2012 04:43:11 +0000 (04:43 +0000)]
start moving SimplifyLibcalls over to getConstantStringInfo, which is
dramatically more efficient than GetConstantStringInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149352
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2012 04:42:22 +0000 (04:42 +0000)]
Change ConstantArray::get to form a ConstantDataArray when possible,
kicking in the big win of ConstantDataArray. As part of this, change
the implementation of GetConstantStringInfo in ValueTracking to work
with ConstantDataArray (and not ConstantArray) making it dramatically,
amazingly, more efficient in the process and renaming it to
getConstantStringInfo.
This keeps around a GetConstantStringInfo entrypoint that (grossly)
forwards to getConstantStringInfo and constructs the std::string
required, but existing clients should move over to
getConstantStringInfo instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149351
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2012 04:39:22 +0000 (04:39 +0000)]
rework this logic to not depend on the last argument to GetConstantStringInfo,
which is going away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149348
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2012 03:39:24 +0000 (03:39 +0000)]
don't emit a 1-byte object as a .fill. This is silly and causes
CodeGen/X86/global-sections.ll to fail with CDArray
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149343
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2012 03:16:39 +0000 (03:16 +0000)]
use the right accessor for ConstantDataArray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149342
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2012 03:15:40 +0000 (03:15 +0000)]
fix asmwriting of ConstantDataArray to use the right element count,
simplify ConstantArray handling, since they can never be empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149341
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Jan 2012 02:55:06 +0000 (02:55 +0000)]
enhance logic to support ConstantDataArray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149340
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 02:09:07 +0000 (02:09 +0000)]
Remove all references to the old EH.
There was always the current EH. -- Ministry of Truth
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149335
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 02:05:13 +0000 (02:05 +0000)]
Update test to new EH model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149333
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 02:04:20 +0000 (02:04 +0000)]
Update test to new EH model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149332
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 01:58:48 +0000 (01:58 +0000)]
Remove the now-dead llvm.eh.exception and llvm.eh.selector intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149331
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 01:48:40 +0000 (01:48 +0000)]
s/getInnerUnwindDest/getInnerResumeDest/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149328
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 01:46:13 +0000 (01:46 +0000)]
Remove the eh.exception and eh.selector intrinsics. Also remove a hack to copy
over the catch information. The catch information is now tacked to the invoke
instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149326
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 01:25:54 +0000 (01:25 +0000)]
Remove ivar which is identical to another ivar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149323
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 01:22:03 +0000 (01:22 +0000)]
Remove unused ivars and s/getOuterUnwindDest/getOuterResumeDest/g.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149322
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 01:18:21 +0000 (01:18 +0000)]
Remove more dead functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149318
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 01:15:59 +0000 (01:15 +0000)]
s/getInnerUnwindDestNewEH/getInnerUnwindDest/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149317
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 01:14:49 +0000 (01:14 +0000)]
Remove some unused, old-EH methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149316
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 31 Jan 2012 01:08:03 +0000 (01:08 +0000)]
Use the correct ShiftAmtTy for creating shifts after legalization. PR11881. Not committing a testcase because I think it will be too fragile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149315
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 01:05:20 +0000 (01:05 +0000)]
Get rid of references to dead intrinsics.
The eh.selector and eh.resume intrinsics aren't used anymore. Get rid of some
calls to them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149314
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 01:01:16 +0000 (01:01 +0000)]
Formatting cleanups. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149312
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 31 Jan 2012 00:57:08 +0000 (00:57 +0000)]
Relax constructor for IntrusiveRefCntPtr to not be explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149309
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 31 Jan 2012 00:57:04 +0000 (00:57 +0000)]
Use traits for IntrusiveRefCntPtr to determine how to increment/decrement a reference count.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149308
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 00:56:53 +0000 (00:56 +0000)]
Remove no-longer-useful dyn_casts and pals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149307
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Jan 2012 00:26:24 +0000 (00:26 +0000)]
Add a constified getLandingPad() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149303
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 30 Jan 2012 23:50:10 +0000 (23:50 +0000)]
[asan] fix the ObjC support (asan Issue #33)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149300
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 30 Jan 2012 23:47:44 +0000 (23:47 +0000)]
Chris's constant data sequence refactoring actually enabled printing
vectors of all one bits to be printed more cleverly in the AsmPrinter.
Unfortunately, the byte value for all one bits is the same with
-fsigned-char as the error return of '-1'. Force this to be the unsigned
byte value when returning it to avoid this problem, and update the test
case for the shiny new behavior.
Yay for building LLVM and Clang with -funsigned-char.
Chris, please review, and let me know if there is any reason to not
desire this change. It seems good on the surface, and certainly intended
based on the code written.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149299
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 30 Jan 2012 23:10:32 +0000 (23:10 +0000)]
PR11834: Use macros which are defined on Windows. Patch by Marina Yatsina.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149294
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 30 Jan 2012 23:05:41 +0000 (23:05 +0000)]
basic-aa does support AliasAnalysis chaining now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149293
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 30 Jan 2012 22:47:12 +0000 (22:47 +0000)]
Intel syntax. Adjust special code, used to recognize cmp<comparison code>{ss,sd,ps,pd}, for intel syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149291
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 30 Jan 2012 22:44:13 +0000 (22:44 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149289
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 30 Jan 2012 21:13:22 +0000 (21:13 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149275
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Mon, 30 Jan 2012 20:47:04 +0000 (20:47 +0000)]
Implement String Cast from Integer
Allow casts from integer to string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149273
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 30 Jan 2012 20:02:42 +0000 (20:02 +0000)]
Intel syntax. Support .intel_syntax directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149270
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 30 Jan 2012 20:01:35 +0000 (20:01 +0000)]
Fix refacto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149269
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Mon, 30 Jan 2012 19:26:20 +0000 (19:26 +0000)]
Here's a new one: GCC was complaining about an only-used-in-asserts
*function*. Wrap the function in #ifndef NDEBUG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149259
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 30 Jan 2012 18:19:30 +0000 (18:19 +0000)]
Various improvements suggested by Duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149255
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 30 Jan 2012 16:57:18 +0000 (16:57 +0000)]
Eliminate narrowing conversion in initializer list, to make C++11 happy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149254
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 30 Jan 2012 15:16:21 +0000 (15:16 +0000)]
X86: Simplify shuffle mask generation code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149248
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Potapenko [Mon, 30 Jan 2012 10:40:22 +0000 (10:40 +0000)]
Fix compilation of ASan tests on OS X Lion (see code.google.com/p/address-sanitizer/issues/detail?id=32)
The redzones emitted by AddressSanitizer for CFString instances confuse the linker and are of little use, so we shouldn't add them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149243
91177308-0d34-0410-b5e6-
96231b3b80d8