Commit Graph

2145 Commits

Author SHA1 Message Date
Daniel Dunbar
00a42449ec lit: Give test formats control over test discovery.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81751 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 02:38:46 +00:00
Chris Lattner
f96271afed slightly increase prettiness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81742 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 01:27:50 +00:00
Chris Lattner
f6761be50d emit the register table as a massive string to avoid relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81741 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 01:26:18 +00:00
Chris Lattner
44da5fbf97 move StringToOffsetTable out to its own header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81740 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 01:19:16 +00:00
Chris Lattner
3200fc9bad factor string table generation out to its own class. This changes
the encoding of the AsmStrs table saving a byte or two.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81739 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 01:16:36 +00:00
Chris Lattner
e7f3107772 eliminate the TargetRegisterDesc::AsmName field, the asmprinters now have this table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81728 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 22:45:04 +00:00
Daniel Dunbar
f845c74c62 Move unittest driver to utils/unittest/UnitTestMain.
- This eliminates a race between building the unittests and linking the
   UnitTestMain library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81719 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 21:31:21 +00:00
Chris Lattner
d95148f073 the tblgen produced 'getRegisterName' method does not access
the object, make it static instead of const.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81711 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 20:19:22 +00:00
Chris Lattner
05af2616d0 make tblgen produce a function that returns the name for a physreg.
Nothing is using this info yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81707 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 20:08:00 +00:00
Daniel Dunbar
5110609ceb tests: Add a %abs_tmp substitution which is guaranteed to be a full path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81662 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 01:39:50 +00:00
Owen Anderson
69110c90bf Eliminate some unnecessary implicit constructors in generated DAG ISel code.
Partial fix for PR4946.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81518 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11 09:01:57 +00:00
Chris Lattner
5f12c21320 PHI nodes can never reach the asmprinter, assert and die instead of printing
out an illegal "PHINODE" instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81495 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11 00:41:15 +00:00
Mikhail Glushenkov
2d04ec5fe6 Distinguish between 'empty' and empty DAG marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81448 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-10 16:22:02 +00:00
Mikhail Glushenkov
684a8b0f10 Add a logical 'not' operator to llvmc's TableGen dialect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81447 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-10 16:21:38 +00:00
Chris Lattner
c5ea263a23 remove DebugLoc from MCInst and eliminate "Comment printing" from
the MCInst path of the asmprinter.  Instead, pull comment printing
out of the autogenerated asmprinter into each target that uses the
autogenerated asmprinter.  This causes code duplication into each
target, but in a way that will be easier to clean up later when more
asmprinter stuff is commonized into the base AsmPrinter class.

This also fixes an xcore strangeness where it inserted two tabs
before every instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81396 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 23:14:36 +00:00
Chris Lattner
28179db68b Fix a subtle bug in "return;" generation which caused us to miss
a return in one case.  Instead of sprinking return handling code
throughout the asmprinter generator, just treat it like any other
normal statement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81395 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 23:09:29 +00:00
Chris Lattner
634cca377a hoist the call to processDebugLoc out of the generated
asm printer into the "printInstruction" routine.  This
fixes a problem where the experimental asmprinter would
drop debug labels in some cases, and fixes issues on ppc/xcore
where pseudo instructions like "mr" didn't get debug locs properly.

It is annoying that this moves the call from one place into each
target, but a future set of more invasive refactorings will fix
that problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81377 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 20:34:59 +00:00
Daniel Dunbar
c60535ab81 Count test correctly with -q.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81313 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 02:41:42 +00:00
Daniel Dunbar
07d0bd4da7 Fix another refactoro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81312 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 02:41:32 +00:00
Daniel Dunbar
f072432e26 lit needs bash for tcl-as-sh execution, we use set -o pipefail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81197 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 06:08:07 +00:00
Daniel Dunbar
ba3931b667 Fix typo that worked on python 2.6.
Also, fix unit tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81194 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 05:46:28 +00:00
Daniel Dunbar
2c0a49c8cb Fix a refactoro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81192 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 05:37:51 +00:00
Daniel Dunbar
be7ada7181 Add 'lit' testing tool.
- make install && man $(llvm-config --prefix)/share/man/man1/lit.1 for more
   information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81190 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 05:31:18 +00:00
Duncan Sands
b7c5bdf843 Remove some unused variables and methods warned about by
icc (#177, partial).  Patch by Erick Tryzelaar.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81106 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 08:33:48 +00:00
Jeffrey Yasskin
9c0c3bf1ec Teach googletest to use raw_ostream instead of just std::ostream.
This can break when there are implicit conversions from types raw_ostream
understands but std::ostream doesn't, but it increases the number of cases that
Just Work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81093 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-05 18:16:17 +00:00
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