Owen Anderson [Tue, 16 Jun 2009 22:51:18 +0000 (22:51 +0000)]
Use a reader-writer lock to guard large portions of the Type infrastructure, including abstract type refinement.
There's still some more work to be done here, such as guarding removeAbstractTypeUser() and the printers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73575
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Jun 2009 22:38:04 +0000 (22:38 +0000)]
fix a circular dependency between the mips code generator
and its asmprinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73573
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Jun 2009 22:26:13 +0000 (22:26 +0000)]
Fix the EE bindings to use the proper EE interfaces for creating a JIT.
Calling into createJIT directly creates a circular dependency between libjit and lib ee.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73567
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 16 Jun 2009 22:25:45 +0000 (22:25 +0000)]
CMake: Only include LLVM example executables in the build if requested by the user
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73566
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 16 Jun 2009 22:18:33 +0000 (22:18 +0000)]
Test for llvm-gcc patch 73564.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73565
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 16 Jun 2009 20:57:51 +0000 (20:57 +0000)]
Accidentally broke this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73552
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 16 Jun 2009 20:53:09 +0000 (20:53 +0000)]
Add newline at end of file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73551
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 16 Jun 2009 20:49:20 +0000 (20:49 +0000)]
Remove the Win32 implementation, since it doesn't compile pre-Vista.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73550
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 16 Jun 2009 20:26:04 +0000 (20:26 +0000)]
Fix #include guards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73548
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 16 Jun 2009 20:25:25 +0000 (20:25 +0000)]
Make the test target-neutral
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73547
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 16 Jun 2009 20:23:05 +0000 (20:23 +0000)]
Fix/cleanup trailing newlines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73546
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 16 Jun 2009 20:19:28 +0000 (20:19 +0000)]
Add a portable wrapper for reader-writer locks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73545
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 16 Jun 2009 20:12:29 +0000 (20:12 +0000)]
Introduce new headers whose inclusion forces linking and
initialization of all targets (InitializeAllTargets.h) or assembler
printers (InitializeAllAsmPrinters.h). This is a step toward the
elimination of relinked object files, so that we can build normal
archives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73543
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Jun 2009 19:55:29 +0000 (19:55 +0000)]
Generalize a few more instcombines to be vector/scalar-independent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73541
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Jun 2009 19:52:01 +0000 (19:52 +0000)]
Instcombine's ShrinkDemandedConstant may strip bits out of constants,
obscuring what would otherwise be a low-bits mask. Use ComputeMaskedBits
to compute what ShrinkDemandedConstant knew about to reconstruct a
low-bits mask value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73540
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 16 Jun 2009 19:44:27 +0000 (19:44 +0000)]
CALL64pcrel32 immediate field is 32-bit. Patch by Abhinav Duggal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73536
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 16 Jun 2009 18:50:49 +0000 (18:50 +0000)]
Address review comments: add 3 ARM calling conventions.
Dispatch C calling conv. to one of these conventions based on
target triple and subtarget features.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73530
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 16 Jun 2009 18:49:08 +0000 (18:49 +0000)]
GNU as refuses to assemble "pop {}" instruction. Do not emit such
(this is the case when we have thumb vararg function with single
callee-saved register, which is handled separately).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73529
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 16 Jun 2009 18:20:20 +0000 (18:20 +0000)]
Add a configure check for pthread_rwlock_init.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73523
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 16 Jun 2009 18:04:19 +0000 (18:04 +0000)]
Update the threading section to reflect current plans/implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73521
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 16 Jun 2009 17:45:38 +0000 (17:45 +0000)]
Add Threading.cpp to the CMake project files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73516
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 16 Jun 2009 17:40:28 +0000 (17:40 +0000)]
Fix validation errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73515
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 16 Jun 2009 17:33:51 +0000 (17:33 +0000)]
Split the thread-related APIs out into their own file, and add a few more
calls for convenience.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73512
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Jun 2009 17:23:25 +0000 (17:23 +0000)]
Testcase for r73506
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73508
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Jun 2009 17:23:12 +0000 (17:23 +0000)]
Generalize instcombine's isSafeToLoadUnconditionally() function
to ignore readonly calls, and factor it out of instcombine so
that it can be used by other passes. Patch by Frits van Bommel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73506
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Tue, 16 Jun 2009 16:17:35 +0000 (16:17 +0000)]
Added missing libcalls for floating point to int conversions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73491
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 16 Jun 2009 10:24:13 +0000 (10:24 +0000)]
Remove the "llvm.umul.with.overflow is broken" warning; it should be
essentially working now, at least for common cases, and it shouldn't
silently generate bad code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73484
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Tue, 16 Jun 2009 10:22:58 +0000 (10:22 +0000)]
Fixed names of libcalls checked in r73480.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73483
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Tue, 16 Jun 2009 09:45:18 +0000 (09:45 +0000)]
Code Restructuring. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73481
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Tue, 16 Jun 2009 09:03:58 +0000 (09:03 +0000)]
Added required libcalls for PIC16 (mostly floating points to integer casting operations).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73480
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 16 Jun 2009 07:15:05 +0000 (07:15 +0000)]
Rename RemoveCopiesFromValNo to TurnCopiesFromValNoToImpDefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73479
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 16 Jun 2009 07:12:58 +0000 (07:12 +0000)]
If a val# is defined by an implicit_def and it is being removed, all of the copies off the val# were removed. This causes problem later since the scavenger will see uses of registers without defs. The proper solution is to change the copies into implicit_def's instead.
TurnCopyIntoImpDef turns a copy into implicit_def and remove the val# defined by it. This causes an scavenger assertion later if the def reaches other blocks. Disable the transformation if the value live interval extends beyond its def block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73478
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 16 Jun 2009 06:58:29 +0000 (06:58 +0000)]
Add some generic expansion logic for SMULO and UMULO. Fixes UMULO
support for x86, and UMULO/SMULO for many architectures, including PPC
(PR4201), ARM, and Cell. The resulting expansion isn't perfect, but it's
not bad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73477
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 16 Jun 2009 06:40:59 +0000 (06:40 +0000)]
Misc accumulated tweaks to legalization logic for various targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73476
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Jun 2009 06:15:56 +0000 (06:15 +0000)]
another xform that is target-independent (should be done in instcombine).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73472
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Jun 2009 06:11:35 +0000 (06:11 +0000)]
I think instcombine should unconditionally do this xform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73471
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 16 Jun 2009 05:15:21 +0000 (05:15 +0000)]
Fix PR4336: Iterating over use-def chains doesn't seem to be deterministic.
The problem was that BitcodeReader::materializeModule would read functions
from the bc file in densemap pointer key order (doubly non-deterministic!),
which would cause the use-def chains to be set up for globals in
non-determinstic order. Non-determinstic use/def chains can cause
nondeterminism in many places down-stream.
Many thanks to Julien Lerouge for putting together the pass in the PR that
shows the issue!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73470
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 16 Jun 2009 04:12:45 +0000 (04:12 +0000)]
There doesn't seem to be a reason to move the save FP stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73468
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 16 Jun 2009 04:06:15 +0000 (04:06 +0000)]
The DWARF to compact encoding converter assumes that the DW_CFA_def_cfa_offset
comes after the DW_CFA_def_cfa_register, because the CFA is really ESP from the
start of the function and only gets an offset when the "subl $xxx,%esp"
instruction happens, not the other way around.
And reapply r72898:
The DWARF unwind info was incorrect. While compiling with
`-fomit-frame-pointer', we would lack the DW_CFA_advance_loc information for a
lot of function, and then they would be `0'. The linker (at least on Darwin)
needs to encode the stack size. In some cases, the stack size is too large to
directly encode. So the linker checks to see if there is a "subl $xxx,%esp"
instruction at the point where the `DW_CFA_def_cfa_offset' says the pc was. If
so, the compact encoding records the offset in the function to where the stack
size is embedded. But because the `DW_CFA_advance_loc' instructions are missing,
it looks before the function and dies.
So, instead of emitting the EH debug label before the stack adjustment
operations, emit it afterwards, right before the frame move stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73465
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 16 Jun 2009 04:02:03 +0000 (04:02 +0000)]
Fix typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73464
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 16 Jun 2009 02:09:30 +0000 (02:09 +0000)]
Use MainCU if it is available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73457
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 16 Jun 2009 01:17:16 +0000 (01:17 +0000)]
Add initial stab at documenting the use of LLVM with threaded clients.
Comments welcome!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73456
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Jun 2009 01:02:32 +0000 (01:02 +0000)]
Add comments to ConstantInt::get and ConstantFP::get to more fully
describe their behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73454
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 16 Jun 2009 00:20:26 +0000 (00:20 +0000)]
Use Type::getScalarType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73451
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Tue, 16 Jun 2009 00:14:20 +0000 (00:14 +0000)]
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73449
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Tue, 16 Jun 2009 00:13:52 +0000 (00:13 +0000)]
Documentation update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73448
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Jun 2009 23:12:00 +0000 (23:12 +0000)]
Remove extraneous propset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73441
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Jun 2009 22:54:48 +0000 (22:54 +0000)]
Owen Anderson 2009-06-15: Use a SmallPtrSet here, for speed and to match df_iterator.
Owen Anderson 2009-06-15: Remember to clear out our maps to prevent crashing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73438
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Jun 2009 22:50:40 +0000 (22:50 +0000)]
Add a CreateFNeg function to IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73437
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Jun 2009 22:49:34 +0000 (22:49 +0000)]
Update this test to use fmul instead of mul.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73436
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Jun 2009 22:32:41 +0000 (22:32 +0000)]
Change this from an assert to a cerr+exit, since it's diagnosing an
unsupported inline asm construct, rather than verifying a code invariant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73435
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 15 Jun 2009 22:32:01 +0000 (22:32 +0000)]
On Darwin, frame pointer r7 is never available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73434
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Jun 2009 22:25:12 +0000 (22:25 +0000)]
Use Type::isIntOrIntVector and Type::isFPOrFPVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73433
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Jun 2009 22:12:54 +0000 (22:12 +0000)]
Support vector casts in more places, fixing a variety of assertion
failures.
To support this, add some utility functions to Type to help support
vector/scalar-independent code. Change ConstantInt::get and
ConstantFP::get to support vector types, and add an overload to
ConstantInt::get that uses a static IntegerType type, for
convenience.
Introduce a new getConstant method for ScalarEvolution, to simplify
common use cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73431
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 15 Jun 2009 22:08:48 +0000 (22:08 +0000)]
Address more comments :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73430
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Jun 2009 21:52:11 +0000 (21:52 +0000)]
Fix a typo in a diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73429
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 15 Jun 2009 21:46:20 +0000 (21:46 +0000)]
Rename methods for the sake of consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73428
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 15 Jun 2009 21:46:02 +0000 (21:46 +0000)]
Document ABIType enum. Patch by Sandeep Patel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73427
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 15 Jun 2009 21:45:50 +0000 (21:45 +0000)]
Gracefully handle imbalanced inline function begin and end markers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73426
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 15 Jun 2009 21:24:34 +0000 (21:24 +0000)]
ifcvt should ignore cfg where true and false successors are the same.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73423
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 15 Jun 2009 21:18:20 +0000 (21:18 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73422
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Jun 2009 21:18:01 +0000 (21:18 +0000)]
Rewrite the noredzone description, attempting to avoid confusing language.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73421
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Jun 2009 20:59:31 +0000 (20:59 +0000)]
The Ls and Qs were mixed up. Patch by Sean.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73417
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 15 Jun 2009 20:59:27 +0000 (20:59 +0000)]
Fix the crash in this test. This is basically the same
problem addressed in 31284, but the patch there only
addressed the case where an invoke is the first thing in
a block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73416
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 15 Jun 2009 20:54:56 +0000 (20:54 +0000)]
Do not form ldrd / strd if the two dests / srcs are the same. Code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73413
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 15 Jun 2009 20:50:26 +0000 (20:50 +0000)]
Merge PartialInliner changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73412
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Jun 2009 19:39:04 +0000 (19:39 +0000)]
"The Intel instruction tables should include the 64-bit and 32-bit instructions
that push immediate operands of 1, 2, and 4 bytes (extended to the native
register size in each case). The assembly mnemonics are "pushl" and "pushq."
One such instruction appears at the beginning of the "start" function , so this
is essential for accurate disassembly when unwinding."
Patch by Sean Callanan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73407
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 15 Jun 2009 19:36:32 +0000 (19:36 +0000)]
Silence a warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73406
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Jun 2009 19:10:56 +0000 (19:10 +0000)]
This test is failing. Revert for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73404
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Jun 2009 18:38:59 +0000 (18:38 +0000)]
Code cleanups. getSCEVAtScope no longer uses SCEVCouldNotCompute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73401
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 15 Jun 2009 18:36:34 +0000 (18:36 +0000)]
Add another testcase for r71478.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73399
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Jun 2009 18:30:15 +0000 (18:30 +0000)]
Make the EnableLoadPRE variable static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73398
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Jun 2009 18:22:49 +0000 (18:22 +0000)]
Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73397
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Jun 2009 18:05:46 +0000 (18:05 +0000)]
glibc has two versions of strerror_r, a standards compliant one and a GNU
specific one. The GNU one is chosen when _GNU_SOURCE is defined. g++ always
defines _GNU_SOURCE on linux platforms because glibc's headers won't compile
in C++ mode without it. The GNU strerror_r doesn't always modify the buffer
which causes empty error messages on linux.
This patch changes MakeErrMsg to use the return value of strerror_r to get
the string instead of assuming the buffer will be modified, on GLIBC.
Patch by Benjamin Kramer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73396
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Jun 2009 17:37:09 +0000 (17:37 +0000)]
Reword the description of the noredzone attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73394
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Mon, 15 Jun 2009 14:43:36 +0000 (14:43 +0000)]
CheckTailCallReturnConstraints is missing a check on the
incomming chain of the RETURN node. The incomming chain must
be the outgoing chain of the CALL node. This causes the
backend to identify tail calls that are not tail calls. This
patch fixes this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73387
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Mon, 15 Jun 2009 12:17:44 +0000 (12:17 +0000)]
x86_64 was completely missing from the target triples supported by the X86 code
generator!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73385
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 15 Jun 2009 10:14:18 +0000 (10:14 +0000)]
Remove the gcc= option. llvm-gcc uses only as=
Look for as in the path. Doing it here instead
of llvm-gcc because llvm-gcc has nothing as
convenient as sys::Program::FindProgramByName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73383
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 15 Jun 2009 08:28:29 +0000 (08:28 +0000)]
Part 1.
- Change register allocation hint to a pair of unsigned integers. The hint type is zero (which means prefer the register specified as second part of the pair) or entirely target dependent.
- Allow targets to specify alternative register allocation orders based on allocation hint.
Part 2.
- Use the register allocation hint system to implement more aggressive load / store multiple formation.
- Aggressively form LDRD / STRD. These are formed *before* register allocation. It has to be done this way to shorten live interval of base and offset registers. e.g.
v1025 = LDR v1024, 0
v1026 = LDR v1024, 0
=>
v1025,v1026 = LDRD v1024, 0
If this transformation isn't done before allocation, v1024 will overlap v1025 which means it more difficult to allocate a register pair.
- Even with the register allocation hint, it may not be possible to get the desired allocation. In that case, the post-allocation load / store multiple pass must fix the ldrd / strd instructions. They can either become ldm / stm instructions or back to a pair of ldr / str instructions.
This is work in progress, not yet enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73381
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Jun 2009 05:46:02 +0000 (05:46 +0000)]
fix testcase to properly check for the patch in r73195.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73380
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Jun 2009 05:38:04 +0000 (05:38 +0000)]
"This patch implements the method with the GetModuleFileName function for windows."
Patch by Benjamin Kramer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73379
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Jun 2009 04:42:32 +0000 (04:42 +0000)]
remove extraneous const qualifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73373
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Jun 2009 04:39:05 +0000 (04:39 +0000)]
I got J and K backward, many thanks to Eli for spotting this!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73372
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Jun 2009 04:18:54 +0000 (04:18 +0000)]
remove some old CVS-specific arguments that don't work with SVN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73369
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Jun 2009 04:17:07 +0000 (04:17 +0000)]
add a new static method to portably determine whether a patch is
absolute or not, based on a patch by Gregory Curfman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73368
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Jun 2009 04:01:39 +0000 (04:01 +0000)]
implement support for the 'K' asm constraint, PR4347
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73366
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 14 Jun 2009 23:30:43 +0000 (23:30 +0000)]
Fix old-style type names in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73362
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 14 Jun 2009 22:58:51 +0000 (22:58 +0000)]
Implement more aggressive folding of add operand lists when
they contain multiplications of constants with add operations.
This helps simplify several kinds of things; in particular it
helps simplify expressions like ((-1 * (%a + %b)) + %a) to %b,
as expressions like this often come up in loop trip count
computations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73361
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 14 Jun 2009 22:55:07 +0000 (22:55 +0000)]
Specialize DenseMapInfo for SCEVHandle, so that SCEVHandles can be
used as keys in DenseMaps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73360
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 14 Jun 2009 22:53:57 +0000 (22:53 +0000)]
Check for the short-circuiting condition before performing
the potentially expensive erase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73359
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 14 Jun 2009 22:51:25 +0000 (22:51 +0000)]
Do compare constant SCEV values in SCEVComplexityCompare, because
even though the order doesn't matter at the top level of an expression,
it does matter when the constant is a subexpression of an n-ary
expression, because n-ary expressions are sorted lexicographically.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73358
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 14 Jun 2009 22:47:23 +0000 (22:47 +0000)]
Convert several parts of the ScalarEvolution framework to use
SmallVector instead of std::vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73357
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 14 Jun 2009 22:38:41 +0000 (22:38 +0000)]
Add another item to the list of things that indvars does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73355
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 14 Jun 2009 22:22:42 +0000 (22:22 +0000)]
Testcase for PR4332.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73353
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 14 Jun 2009 20:22:55 +0000 (20:22 +0000)]
Move register allocation preference (or hint) from LiveInterval to MachineRegisterInfo. This allows more passes to set them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73346
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Sun, 14 Jun 2009 13:39:56 +0000 (13:39 +0000)]
Fix CMake build. Patch from Ingmar Vanhassel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73342
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sun, 14 Jun 2009 08:26:32 +0000 (08:26 +0000)]
Add an early implementation of a partial inlining pass. The idea behind this
is that, for functions whose bodies are entirely guarded by an if-statement, it
can be profitable to pull the test out of the callee and into the caller.
This code has had some cursory testing, but still has a number of known issues
on the LLVM test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73338
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Sun, 14 Jun 2009 07:53:21 +0000 (07:53 +0000)]
Introduce new BinaryObject (blob) class, ELF Writer modified to use it. BinaryObject.h by Aaron Gray
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73333
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 14 Jun 2009 07:24:49 +0000 (07:24 +0000)]
Add output of the SFINAE bit for Clang's diagnostics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73331
91177308-0d34-0410-b5e6-
96231b3b80d8
Shantonu Sen [Sun, 14 Jun 2009 02:03:17 +0000 (02:03 +0000)]
Add myself, test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73320
91177308-0d34-0410-b5e6-
96231b3b80d8