Commit Graph

12580 Commits

Author SHA1 Message Date
Gabor Greif
d299ab1669 back out r114279 as some darwin buildbots get errors compiling clang:
svn merge -c -114279 llvm/include/llvm/Support/Casting.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114280 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-18 12:56:47 +00:00
Gabor Greif
ce31f40295 restrict dyn_cast_or_null to pointer types, just like cast_or_null
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114279 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-18 12:30:15 +00:00
Gabor Greif
89730dca5a remove CallSite::get; it is still present (as protected) in the baseclass, use one of the constructors intead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114275 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-18 11:48:36 +00:00
Lang Hames
eb6c8f53b4 Added a separate class (PBQPBuilder) for PBQP Problem construction. This class can be extended to support custom constraints.
For now the allocator still uses the old (internal) construction mechanism by default. This will be phased out soon assuming 
no issues with the builder system come up.

To invoke the new construction mechanism just pass '-regalloc=pbqp -pbqp-builder' to llc. To provide custom constraints a
Target just needs to extend PBQPBuilder and pass an instance of their derived builder to the RegAllocPBQP constructor.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114272 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-18 09:07:10 +00:00
Jim Grosbach
fd2eaed4f0 trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114211 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17 21:23:56 +00:00
Dan Gohman
3f2f21e640 Attempt to support platforms which don't have fenv.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114196 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17 20:06:27 +00:00
Gabor Greif
0ccf6f14c8 fix comments; patch by Edmund Grimley-Evans\!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114189 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17 17:52:00 +00:00
Bill Wendling
2d32a292c3 Add "pointer to x86mmx" type to the intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114140 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17 00:33:03 +00:00
Owen Anderson
1e3e6362c8 Do not expose the locking for the PassRegistry in the header. Be careful to
synchronize any method that might lazily initialize the pImpl.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114130 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-16 23:32:35 +00:00
Dan Gohman
ead0109f5b Add a pass which prints out all the memdep dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114121 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-16 22:08:32 +00:00
Owen Anderson
4e282decf3 Revert r114097, adding back in the assertion against replacing an Instruction by itself. Now that CorrelatedValuePropagation is
more careful not to call SimplifyInstructionsInBlock() on an unreachable block, the issue has been fixed at a higher level.  Add
a big warning to SimplifyInstructionsInBlock() to hopefully prevent this in the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114117 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-16 20:51:41 +00:00
Jim Grosbach
6dbe29e34e make this non brain dead...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114100 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-16 17:48:08 +00:00
Jim Grosbach
dc01b2e1df Remove unnecessary by-reference return.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114099 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-16 17:45:21 +00:00
Duncan Sands
5754a45256 Add better support for environment portion of triple. Original patch by
Cameron Esfahani, tweaked to use array_lengthof.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114073 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-16 08:25:48 +00:00
Jim Grosbach
a8e47b3319 store MC FP immediates as a double instead of as an APFloat, thus avoiding an
unnecessary dtor for MCOperand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114064 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-16 03:45:21 +00:00
Owen Anderson
b6d760c7d5 Since PassRegistry is currently a shared global object, it needs locking. While it might intuitively seem
that all the setup of this class currently happens at static initialization time, this misses the fact
that some later events can cause mutation of the PassRegistrationListeners list, and thus cause race issues.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114036 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 23:03:33 +00:00
Michael J. Spencer
8a26f81889 System/Path: Add isObjectFile().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114032 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 22:45:45 +00:00
Rafael Espindola
d80781b98b Add a InitSections method to the streamer interface.
The ELF implementation now creates text, data and bss to match the gnu as
behavior.

The text streamer still has the old MachO specific behavior since
the testsuite checks that it will error when a directive is given
before a setting the current section for example.

A nice benefit is that -n is not required anymore when producing
ELF files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114027 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 21:48:40 +00:00
Jim Grosbach
26edbcb8d5 Add support for floating point immediates to MC instruction printing. ARM
VFP instructions use it for loading some constants, so implement that
handling.

Not thrilled with adding a member to MCOperand, but not sure there's much of
a better option that's not pretty fragile (like putting a double in the
union instead and just assuming that's good enough). Suggestions welcome...



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113996 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 18:47:08 +00:00
Bob Wilson
064312de86 Spelling fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113978 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 16:28:21 +00:00
Jim Grosbach
0dd2c93318 trailing whitespace and 80 column cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113977 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 16:24:01 +00:00
Jim Grosbach
85dbce31d0 trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113975 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 16:08:15 +00:00
Duncan Sands
97816e1bad Remove LLVM_GLOBAL_VISIBILITY, which is unused, and was not working properly.
The problem was that the test for whether a compiler supports it or not was
inaccurate, but has to be accurate: LLVM_LOCAL_VISIBILITY is an optimization
and not needed for correctness, so wrongly thinking a compiler doesn't support
it is not a big deal, but LLVM_GLOBAL_VISIBILITY is for correctness, and not
an optimization: getting it wrong is fatal: it needs to be set based on a
configure test not testing the gcc version.  Since dragonegg has moved to a
different scheme, and it was the only user of LLVM_GLOBAL_VISIBILITY, just
remove this macro.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113959 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 08:09:55 +00:00
Dale Johannesen
29fc6f35a5 Add x86MMX a few more places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113914 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 00:52:23 +00:00
Benjamin Kramer
3b8b2ca3a8 Add missing include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113859 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-14 21:25:38 +00:00
Dan Gohman
b2143b6247 Remove the experimental AliasAnalysis::getDependency interface, which
isn't a good level of abstraction for memdep. Instead, generalize
AliasAnalysis::alias and related interfaces with a new Location
class for describing a memory location. For now, this is the same
Pointer and Size as before, plus an additional field for a TBAA tag.

Also, introduce a fixed MD_tbaa metadata tag kind.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113858 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-14 21:25:10 +00:00
Benjamin Kramer
6a7de3f205 Prune includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113850 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-14 20:49:00 +00:00
Devang Patel
7332907186 After Dan's recent commit this is no longer true.
Now isFunctionLocal is reset, if required,  when operands are modified.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113845 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-14 20:32:58 +00:00
Eric Christopher
338f3acb7f Remove apparently unnecessary forward declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113827 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-14 01:18:15 +00:00
Benjamin Kramer
12ea765632 Fix linux/msvc build, move include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113776 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-13 20:04:49 +00:00
Owen Anderson
16150c67a3 Attempt to fix the Linux build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113773 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-13 19:47:32 +00:00
Owen Anderson
049e42f0b4 Minimize #includes in a top-level header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113772 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-13 18:47:42 +00:00
John Thompson
eac6e1d0c7 Added skeleton for inline asm multiple alternative constraint support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113766 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-13 18:15:37 +00:00
Dale Johannesen
e37c9e59b4 Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113728 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-12 22:36:13 +00:00
Chris Lattner
cbf8a98c7c fix the asmparser so that the target is responsible for skipping to
the end of the line on a parser error, allowing skipping to happen
for syntactic errors but not for semantic errors.  Before we would
miss emitting a diagnostic about the second line, because we skipped
it due to the semantic error on the first line:

  foo %eax
  bar %al

This fixes rdar://8414033 - llvm-mc ignores lines after an invalid instruction mnemonic errors


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113688 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-11 16:18:25 +00:00
Bill Wendling
a65568676d Rename ConvertToSetZeroFlag to something more general.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113670 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-11 00:13:50 +00:00
Bill Wendling
3665661a57 No need to recompute the SrcReg and CmpValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113666 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 23:46:12 +00:00
Bill Wendling
92ad57f066 Move some of the decision logic for converting an instruction into one that sets
the 'zero' bit down into the back-end. There are other cases where this logic
isn't sufficient, so they should be handled separately.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113665 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 23:34:19 +00:00
Gabor Greif
e2d50046fd typoes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113647 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 22:25:58 +00:00
Bill Wendling
220e240bdf Modify the comparison optimizations in the peephole optimizer to update the
iterator when an optimization took place. This allows us to do more insane
things with the code than just remove an instruction or two.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113640 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 21:55:43 +00:00
Dale Johannesen
bb811a2445 Add X86 MMX type to bitcode and Type.
(The Ada bindings probably need it too, but all the
obvious places to change say "do not edit this file".)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113618 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 20:55:01 +00:00
Bill Wendling
de49f360ec Auto-upgrade the magic ".llvm.eh.catch.all.value" global to
"llvm.eh.catch.all.value". Only the name needs to be changed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113600 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 18:51:56 +00:00
Dale Johannesen
d6934e4cee x86mmx is 64 bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113594 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 17:51:47 +00:00
Jim Grosbach
cc38399ea9 add a comment explicitly calling out that allocation orders may include
reserved regs and that register allocators need to explicitly check for
them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113593 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 17:51:34 +00:00
Evan Cheng
3ef1c8759a Teach if-converter to be more careful with predicating instructions that would
take multiple cycles to decode.
For the current if-converter clients (actually only ARM), the instructions that
are predicated on false are not nops. They would still take machine cycles to
decode. Micro-coded instructions such as LDM / STM can potentially take multiple
cycles to decode. If-converter should take treat them as non-micro-coded
simple instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113570 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 01:29:16 +00:00
Dan Gohman
70c2fc0823 Discard metadata produced by LLVM 2.7. The value enumeration it used
is different from what the code now uses in a two ways: NamedMDNodes
were considered Values and included in the numbering, and the
function-local metadata counter wasn't reset between functions.

The later problem breaks lazy deserialization, so instead of trying
to emulate the old numbering, just drop the old metadata. The only
in-tree use case is debug info with LTO, where the QOI loss is
considered acceptable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113557 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 23:12:39 +00:00
Owen Anderson
f9a26b89f8 What the loop unroller cares about, rather than just not unrolling loops with calls, is
not unrolling loops that contain calls that would be better off getting inlined.  This mostly
comes up when an interleaved devirtualization pass has devirtualized a call which the inliner
will inline on a future pass.  Thus, rather than blocking all loops containing calls, add
a metric for "inline candidate calls" and block loops containing those instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113535 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 20:32:23 +00:00
Dan Gohman
c8ddbdabb6 Extend the getDependence query with support for PHI translation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113521 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:37:31 +00:00
Dan Gohman
e744541788 Add a getPointerOperand() helper function to VAArgInst, for consistency
with LoadInst and StoreInst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113520 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:32:40 +00:00
Evan Cheng
5f54ce3473 For each instruction itinerary class, specify the number of micro-ops each
instruction in the class would be decoded to. Or zero if the number of
uOPs must be determined dynamically.

This will be used to determine the cost-effectiveness of predicating a
micro-coded instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113513 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:18:55 +00:00