Commit Graph

2120 Commits

Author SHA1 Message Date
Bob Wilson
cdfa01bf0f PR4795: Remove EEVT::isFP, isInt and isVec types used by TableGen's type
inferencing.  As far as I can tell, these are equivalent to the existing
MVT::fAny, iAny and vAny types, and having both of them makes it harder
to reason about and modify the type inferencing code.

The specific problem in PR4795 occurs when updating a vAny type to be fAny
or iAny, or vice versa.  Both iAny and fAny include vector types -- they
intersect with the set of types represented by vAny.  When merging them,
choose fAny/iAny to represent the intersection.  This is not perfect, since
fAny/iAny also include scalar types, but it is good enough for TableGen's
type inferencing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80423 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-29 05:53:25 +00:00
Bob Wilson
98dd4e67bc Disable optional bindings for Apple-style builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80319 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 00:21:13 +00:00
Bob Wilson
20a709f9de Revert 76080. This broke some powerpc cross compiles.
It also makes the llvmCore build dependent on whatever version of llvm-gcc
happens to be installed on the build machine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80316 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28 00:10:15 +00:00
Daniel Dunbar
b562b47dee Don't build runtime libraries in an Apple style build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80303 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 23:43:28 +00:00
Bob Wilson
fd87e6a7aa Fix bad length argument to substr calls. Apparently I'm the first one to
attempt more than 2 constraints on an instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80169 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 22:50:39 +00:00
Bill Wendling
8464f07235 Don't submit test directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80139 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 21:00:34 +00:00
Dale Johannesen
de86d473fc Add an 'inline hint' attribute to represent source
code hints that it would be a good idea to inline
a function ("inline" keyword).  No functional change
yet; FEs do not emit this and inliner does not use it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80063 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 01:08:21 +00:00
Dan Gohman
baa26395cc Make LLVM command-line tools overwrite their output files without -f.
This is conventional command-line tool behavior. -f now just means
"enable binary output on terminals".

Add a -f option to llvm-extract and llvm-link, for consistency.

Remove F_Force from raw_fd_ostream and enable overwriting and
truncating by default. Introduce an F_Excl flag to permit users to
enable a failure when the file already exists. This flag is
currently unused.

Update Makefiles and documentation accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79990 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 15:34:52 +00:00
Chris Lattner
23132b188b prune the #includes in raw_ostream.h by moving a
member out of line. ftostr is not particularly speedy,
so that method is presumably not perf sensitive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79885 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 03:52:50 +00:00
Chris Lattner
e8f6e795ff search unittests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79884 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 03:44:02 +00:00
Chris Lattner
74382b7c69 Prune #includes from llvm/Linker.h and llvm/System/Path.h,
forcing them down into various .cpp files.

This change also:
1. Renames TimeValue::toString() and Path::toString() to ::str()
   for similarity with the STL.
2. Removes all stream insertion support for sys::Path, forcing
   clients to call .str().
3. Removes a use of Config/alloca.h from bugpoint, using smallvector
   instead.
4. Weans llvm-db off <iostream>

sys::Path really needs to be gutted, but I don't have the desire to
do it at this point.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79869 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 22:45:37 +00:00
Benjamin Kramer
5b9e7ef627 Try to fix MSVC build after r79846.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79850 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 10:39:21 +00:00
Daniel Dunbar
6f5cc82686 Fix non-determinism in DAGISel emitter.
- This manifested as non-determinism in the .inc output in rare cases (when two
   distinct patterns ended up being equivalent, which is rather rare). That
   meant the pattern matching was non-deterministic, which could eventually mean
   the code generator selected different instructions based on the arch.

 - It's probably worth making the DAGISel ensure a total ordering (or force the
   user to), but the simple fix here is to totally order the Record* maps based
   on a unique ID.

 - PR4672, PR4711.

Yay:
--
ddunbar@giles:~$ cat ~/llvm.obj.64/lib/Target/*/*.inc | shasum
d1099ff34b21459a5a3e7021c225c080e6017ece  -
ddunbar@giles:~$ cat ~/llvm.obj.ppc/lib/Target/*/*.inc | shasum
d1099ff34b21459a5a3e7021c225c080e6017ece  -
--

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79846 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 09:47:37 +00:00
Chris Lattner
45cfe545ec Change Pass::print to take a raw ostream instead of std::ostream,
update all code that this affects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79830 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 06:03:38 +00:00
Chris Lattner
569f121f4e remove some DOUTs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79821 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 04:44:11 +00:00
Douglas Gregor
05e9d99767 Don't install FileCheck or FileUpdate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79820 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 04:39:38 +00:00
Chris Lattner
17e9edc4a7 Change raw_fd_ostream to take flags as an optional bitmask
instead of as two bools.  Use this to add a F_Append flag
which has the obvious behavior.

Other unrelated changes conflated into this patch:

1. REmove EH stuff from llvm-dis and llvm-as, the try blocks
   are dead.
2. Simplify the filename inference code in llvm-as/llvm-dis,
   because raw_fd_ostream does the right thing with '-'.
3. Switch machine verifier to use raw_ostream instead of ostream
   (Which is the thing that needed append in the first place).




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79807 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 02:51:22 +00:00
Devang Patel
24f20e0832 Record variable debug info at ISel time directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79742 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 17:12:53 +00:00
Anton Korobeynikov
1c8e581832 Add lowering of ARM 4-element shuffles to multiple instructios via perfectshuffle-generated table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79624 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 12:41:24 +00:00
Anton Korobeynikov
c9d44f0d9c Add simple cost model to perfect shuffle. Currently we're doing just greedy search for cost instead of (proper) dynamic programming approach.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79623 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 12:41:03 +00:00
Anton Korobeynikov
cb02ddeda0 Whitespace cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79618 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-21 12:39:38 +00:00
Evan Cheng
52151168bc Even more Apple style build horribleness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79299 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 00:56:17 +00:00
Anton Korobeynikov
e55db74152 The attached patches attempt to fix cross builds. For example, if you
try to use i686-darwin to build for arm-eabi, you'll quickly run into
several false assumptions that the target OS must be the same as the
host OS. These patches split $(OS) into $(HOST_OS) and $(TARGET_OS) to
help builds like "make check" and the test-suite able to cross
compile. Along the way a target of *-unknown-eabi is defined as
"Freestanding" so that TARGET_OS checks have something to work with.

Patch by Sandeep Patel!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79296 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 00:40:33 +00:00
David Goodwin
fac8541dd4 Extend the instruction itinerary model to include the ability to indicate the def and use cycle for each operand. This additional information is optional, so existing itineraries do not need to be changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79247 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 16:02:57 +00:00
Chris Lattner
8f4b1ec02b the MinPad argument to PadToColumn only really makes sense to be 1,
just remove the argument and replace it with 1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79246 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 15:48:08 +00:00
Chris Lattner
0b2353f277 when emitting errors about CHECK-NEXT directives, show the line that the
CHECK-NEXT is on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79164 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-16 02:22:31 +00:00
Chris Lattner
5dafafdeb4 implement support for CHECK-NEXT: in filecheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79123 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 18:32:21 +00:00
Chris Lattner
d7e250527c simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79121 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 18:00:42 +00:00
Chris Lattner
7bee3271e8 rewrite FindStringInBuffer to use an explicit loop instead of
trying to wrap strstr which is just too inconvenient.  Make it
use a StringRef to avoid ".c_str()" calls.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79120 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 17:53:12 +00:00
Chris Lattner
207e1bcf89 Instead of using an std::pair, use a custom struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79119 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 17:41:04 +00:00
Owen Anderson
1d0be15f89 Push LLVMContexts through the IntegerType APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 21:58:54 +00:00
Bob Wilson
36e3e668be Add a new "SDTCisVec" SDTypeConstraint. This complements the vAny type.
There have been a few times where I've wanted this but ended up leaving the
operand type unconstrained.  It is easy to add this now and should help
catch errors in the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78849 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 22:30:59 +00:00
Dan Gohman
a9ad04191c This void is implicit in C++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78848 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 22:10:57 +00:00
David Goodwin
1a8f36e3ce Enhance the InstrStage object to enable the specification of an Itinerary with overlapping stages. The default is to maintain the current behavior that the "next" stage immediately follows the previous one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78827 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 18:31:53 +00:00
Owen Anderson
23b9b19b1a Add contexts to some of the MVT APIs. No functionality change yet, just the infrastructure work needed to get the contexts to where they need to be first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78759 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 00:36:31 +00:00
Daniel Dunbar
1095f2ae26 llvm-mc/AsmParser: Match hard coded registers (e.g. 'shldl %cl, %eax, %eax')
We now match all of 403.gcc (as emitted by clang). :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78750 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 23:23:44 +00:00
Daniel Dunbar
7417b761c2 Add 'isCodeGenOnly' bit to Instruction .td records.
- Used to mark fake instructions which don't correspond to an actual machine
   instruction (or are duplicates of a real instruction). This is to be used for
   "special cases" in the .td files, which should be ignored by things like the
   assembler and disassembler. We still need a good solution to handle pervasive
   duplication, like with the Int_ instructions.

 - Set the bit on fake "mov 0" style instructions, which allows turning an
   assembler matcher warning into a hard error.

 - -2 FIXMEs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78731 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 22:17:52 +00:00
Daniel Dunbar
59fc42debd llvm-mc/AsmParser: Allow target to specific a comment delimiter, which will be
used to strip hard coded comments out of .td assembly strings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78716 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 20:59:47 +00:00
Owen Anderson
825b72b057 Split EVT into MVT and EVT, the former representing _just_ a primitive type, while
the latter is capable of representing either a primitive or an extended type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78713 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 20:47:22 +00:00
Daniel Dunbar
8409bfbbc3 llvm-mc/AsmMatcher: Fix two thinkos in determining whether two classes are
related.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78706 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 20:10:07 +00:00
Bob Wilson
9b6a53a0ce Fix a few more places in TableGen that need to handle EVT::vAny types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78643 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 05:03:38 +00:00
Daniel Dunbar
ea6408f8cd llvm-mc/AsmParser: Implement automatic classification of RegisterClass operands.
- This drops us to 123 ambiguous instructions (previously ~500) on X86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78636 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 02:59:53 +00:00
Bob Wilson
61fc4cf7aa Add a new overloaded EVT::vAny type for use in TableGen to allow intrinsic
arguments that are vectors of any size and element type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78631 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 01:14:02 +00:00
Owen Anderson
e50ed30282 Rename MVT to EVT, in preparation for splitting SimpleValueType out into its own struct type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78610 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-10 22:56:29 +00:00
Daniel Dunbar
5c468e3d70 llvm-mc/AsmParser: Allow .td users to redefine the names of the methods to call
on target specific operands for testing class membership and converting to
MCInst operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78597 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-10 21:00:45 +00:00
Daniel Dunbar
ac6b4f2c0c llvm-mc/AsmMatcher: Remove some code which has been obsoleted by move to
explicit parser match classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78588 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-10 19:08:50 +00:00
Daniel Dunbar
338825c192 llvm-mc/AsmMatcher: Change assembler parser match classes to their own record
structure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78581 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-10 18:41:10 +00:00
Daniel Dunbar
fdb1f493ab llvm-mc/AsmParser: Check for matches with super classes when matching
instruction operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78565 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-10 16:05:47 +00:00
Daniel Dunbar
db2ddb5dc5 llvm-mc/AsmParser: Fix thinko in ClassInfo::operator<.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78533 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09 08:23:23 +00:00
Daniel Dunbar
72fa87f0cf llvm-mc/AsmParser: Add hack to ignore Int_* and *_Int instructions for now, to
make it easier to see interesting ambiguities.
 - Also, check that user doesn't try to redefine the super class. This is a wart
   in the current design, in that assembler match classes aren't explicitly
   declared somewhere (so there isn't a unique place to declare the super
   class). This should probably be fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78532 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09 08:19:00 +00:00