1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
Commit Graph

1225 Commits

Author SHA1 Message Date
Bill Wendling
8d8d9a2f5e Reverting 44702. It wasn't correct to rename them.
llvm-svn: 44727
2007-12-08 23:58:46 +00:00
Duncan Sands
1e2e4972ff Rather than having special rules like "intrinsics cannot
throw exceptions", just mark intrinsics with the nounwind
attribute.  Likewise, mark intrinsics as readnone/readonly
and get rid of special aliasing logic (which didn't use
anything more than this anyway).

llvm-svn: 44544
2007-12-03 20:06:50 +00:00
Devang Patel
78267aca13 Change LinkTimeOptimizer.h install location.
llvm-svn: 44477
2007-12-01 00:24:50 +00:00
Devang Patel
cf59cd82d5 Change lib lto install location.
llvm-svn: 44476
2007-11-30 23:27:57 +00:00
Ted Kremenek
8e1a74fd21 Updated GenLibDeps.pl to employ "use strict" to help prevent uses of variables
that have not yet been defined.

Removed used of grep and sed when parsing the results of "nm". This was
originally motivated because if the user has specified options to grep using
the environment variable GREP_OPTIONS this could break the script. Piping
through grep/sed/sort/uniq is also (to my understanding) not necessary, and
the equivalent operations can be done much faster in the Perl script.

Using a crude benchmark, these changes resulted in a 3x speedup in the
execution of GenLibDeps.pl.

llvm-svn: 44372
2007-11-27 19:31:11 +00:00
Chuck Rose III
57c2305216 Add TGParser files to VStudio project files. Removed generated files section from TableGen project file as it is no longer needed. #Include <algorithm> directly from TGParser.cpp so it can see std::reverse.
llvm-svn: 44340
2007-11-26 23:19:59 +00:00
Chris Lattner
59d787cb83 add missing #include
llvm-svn: 44282
2007-11-22 23:19:05 +00:00
Chris Lattner
192e1e5ae8 resolve the last fixme's in the new tblgen parser.
llvm-svn: 44277
2007-11-22 21:06:59 +00:00
Chris Lattner
ac95162b44 change the Init print methods to return strings, and implement
print in terms of that.

llvm-svn: 44276
2007-11-22 21:05:25 +00:00
Chris Lattner
118519d38d eliminate a bunch of print methods that are duplicate with the getAsString() method.
llvm-svn: 44275
2007-11-22 20:51:34 +00:00
Chris Lattner
c447b7a449 Rewrite the tblgen parser in a recursive descent style, eliminating the bison parser.
This makes the parser much easier to understand, eliminates a ton of global variables,
and gives tblgen nice caret diagnostics.  It is also faster, but tblgen probably doesn't
care about performance.

There are a couple of FIXMEs which I will take care of next.

llvm-svn: 44274
2007-11-22 20:49:04 +00:00
Chuck Rose III
644434c904 Switching back to strtoll. Including config.h. On VStudio builds, this overrides strtoll.
llvm-svn: 44264
2007-11-21 19:36:25 +00:00
Chuck Rose III
b1944d8afb This change does a couple of things. First it gets the Visual Studio builds working.
I added the lexing files to the VStudio projects and removed the .l files from the 
VStudio projects.  There was a problem with use of strtoll in TGLexer.cpp and Chris
suggested switching to strtol, so that's included here.

Additionally, this checkin adds minimal x64 builds to the VStudio builds.  Build issues
related to x64 in the windows specific files for DynamicLibrary.inc and Singals.inc
are worked around, but not ultimately solved.  Binaries used to be stored in

...\win32\{Debug|Release}

but are now kept in

...\win32\bin\{win32|x64}\{Debug|Release}

intermediate files will continue to be stored in the individual project directories under 
win32.  

Some names will likely change in the future to reflect that the vstudio projects
are no longer 32-bit only, but I wanted to get things up and running today so kept away
from bigger restructuring.

llvm-svn: 44260
2007-11-21 00:37:56 +00:00
Chris Lattner
7627a7d8f4 Add the ability to convert a tblgen type to a string.
llvm-svn: 44257
2007-11-20 22:25:16 +00:00
Chris Lattner
4de076fe41 Record the start of the current token, for use in error reporting.
llvm-svn: 44227
2007-11-19 07:43:52 +00:00
Chris Lattner
b5d55431b7 Add carat diagnostics to tblgen lexer errors.
llvm-svn: 44226
2007-11-19 07:38:58 +00:00
Chris Lattner
ea7765860d minor cleanups
llvm-svn: 44212
2007-11-18 05:48:46 +00:00
Chris Lattner
a1d537ed5e ensure header is self contained.
llvm-svn: 44211
2007-11-18 05:25:45 +00:00
Chris Lattner
07a4b4d5fe reimplement the tblgen lexer with a simple hand-written lexer. This eliminates
one dependency on flex and gets rid of two ".cvs" files.

llvm-svn: 44210
2007-11-18 02:57:27 +00:00
Duncan Sands
e6821dd990 Eliminate the recently introduced CCAssignToStackABISizeAlign
in favour of teaching CCAssignToStack that size 0 and/or align
0 means to use the ABI values.  This seems a neater solution.
It is safe since no legal value type has size 0.

llvm-svn: 44107
2007-11-14 08:29:13 +00:00
Dale Johannesen
5fd9e7a615 Add parameter to getDwarfRegNum to permit targets
to use different mappings for EH and debug info;
no functional change yet.
Fix warning in X86CodeEmitter.

llvm-svn: 44056
2007-11-13 19:13:01 +00:00
Bill Wendling
de7d68ad52 Move SYSCTL stuff close to where it's used.
llvm-svn: 44031
2007-11-12 23:55:19 +00:00
Devang Patel
a490cc2952 Build universal llvm.
llvm-svn: 44030
2007-11-12 23:53:43 +00:00
Owen Anderson
aba398a5ce Add a flag for indirect branch instructions.
Target maintainers: please check that the instructions for your target are correctly marked.

llvm-svn: 44012
2007-11-12 07:39:39 +00:00
Owen Anderson
df575e4ae5 Fix on 64-bit machines.
llvm-svn: 44001
2007-11-12 00:56:04 +00:00
Anton Korobeynikov
8e8473c783 Use TableGen to emit information for dwarf register numbers.
This makes DwarfRegNum to accept list of numbers instead.
Added three different "flavours", but only slightly tested on x86-32/linux.
Please check another subtargets if possible,

llvm-svn: 43997
2007-11-11 19:50:10 +00:00
Anton Korobeynikov
cdfd2ddaa7 Add convenient helper to obtain list of ints
llvm-svn: 43993
2007-11-11 11:19:37 +00:00
Dale Johannesen
2e9b020e89 Add CCAssignToStackABISizeAlign for convenience in
dealing with types whose size & alignment are
different on different subtargets.  Use it for x86 f80.

llvm-svn: 43988
2007-11-10 22:07:15 +00:00
Evan Cheng
c6287abec9 Added -test-opts to specify test options.
llvm-svn: 43971
2007-11-10 01:33:27 +00:00
Bill Wendling
2405ec2b73 Initial commit of files that support building LLVM the "Apple" way.
llvm-svn: 43929
2007-11-09 06:59:33 +00:00
Dale Johannesen
a863789700 Interchange Dwarf numbers of ESP and EBP on x86 Darwin.
Much improvement in exception handling.

llvm-svn: 43794
2007-11-07 00:25:05 +00:00
Neil Booth
cd1d243989 Remove some unnecessary C-style statics.
Restore an assertion that arithmetic can be performed on this format.

llvm-svn: 43638
2007-11-02 15:10:05 +00:00
Chris Lattner
348195148a switch some calls to SelectionDAG::getTargetNode to use
the one that takes an operand list instead of explicit
operands.  There is one left though, the more interesting
one :)

llvm-svn: 43290
2007-10-24 06:25:09 +00:00
Anton Korobeynikov
f04f8f28fc Update this file for 2.0 syntax. Contributed by Jan Rehders
llvm-svn: 43182
2007-10-19 16:54:13 +00:00
Chris Lattner
6b180c4e51 tblgen uses dynamic_cast heavily, so it needs rtti info
llvm-svn: 43126
2007-10-18 15:54:45 +00:00
Gordon Henriksen
333dc95c98 Reverting unnecessary commit of generated files.
llvm-svn: 43095
2007-10-17 21:36:08 +00:00
Gordon Henriksen
a6050b38d2 Switching TargetMachineRegistry to use the new generic Registry.
llvm-svn: 43094
2007-10-17 21:28:48 +00:00
Hartmut Kaiser
ed12f66488 Updated VC++ build system.
Silenced some VC warnings.

I'm getting linker errors, though: unresolved externals:

llvm::Split<class llvm::BasicBlock *,struct llvm::GraphTraits<class llvm::BasicBlock *> >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)

and

llvm::Split<struct llvm::Inverse<class llvm::BasicBlock *>,struct llvm::GraphTraits<struct llvm::Inverse<class llvm::BasicBlock *> > >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)

Where are these defined?

llvm-svn: 43073
2007-10-17 14:56:40 +00:00
Chris Lattner
452ebc199e One mundane change: Change ReplaceAllUsesOfValueWith to *optionally*
take a deleted nodes vector, instead of requiring it.

One more significant change:  Implement the start of a legalizer that
just works on types.  This legalizer is designed to run before the 
operation legalizer and ensure just that the input dag is transformed
into an output dag whose operand and result types are all legal, even
if the operations on those types are not.

This design/impl has the following advantages:

1. When finished, this will *significantly* reduce the amount of code in
   LegalizeDAG.cpp.  It will remove all the code related to promotion and
   expansion as well as splitting and scalarizing vectors.
2. The new code is very simple, idiomatic, and modular: unlike 
   LegalizeDAG.cpp, it has no 3000 line long functions. :)
3. The implementation is completely iterative instead of recursive, good
   for hacking on large dags without blowing out your stack.
4. The implementation updates nodes in place when possible instead of 
   deallocating and reallocating the entire graph that points to some 
   mutated node.
5. The code nicely separates out handling of operations with invalid 
   results from operations with invalid operands, making some cases
   simpler and easier to understand.
6. The new -debug-only=legalize-types option is very very handy :), 
   allowing you to easily understand what legalize types is doing.

This is not yet done.  Until the ifdef added to SelectionDAGISel.cpp is
enabled, this does nothing.  However, this code is sufficient to legalize
all of the code in 186.crafty, olden and freebench on an x86 machine.  The
biggest issues are:

1. Vectors aren't implemented at all yet
2. SoftFP is a mess, I need to talk to Evan about it.
3. No lowering to libcalls is implemented yet.
4. Various operations are missing etc.
5. There are FIXME's for stuff I hax0r'd out, like softfp.

Hey, at least it is a step in the right direction :).  If you'd like to help,
just enable the #ifdef in SelectionDAGISel.cpp and compile code with it.  If
this explodes it will tell you what needs to be implemented.  Help is 
certainly appreciated.

Once this goes in, we can do three things:

1. Add a new pass of dag combine between the "type legalizer" and "operation
   legalizer" passes.  This will let us catch some long-standing isel issues
   that we miss because operation legalization often obfuscates the dag with
   target-specific nodes.
2. We can rip out all of the type legalization code from LegalizeDAG.cpp,
   making it much smaller and simpler.  When that happens we can then 
   reimplement the core functionality left in it in a much more efficient and
   non-recursive way.
3. Once the whole legalizer is non-recursive, we can implement whole-function
   selectiondags maybe...

llvm-svn: 42981
2007-10-15 06:10:22 +00:00
Evan Cheng
a18e8dc542 Fix typos.
llvm-svn: 42896
2007-10-12 08:39:02 +00:00
Tanya Lattner
312ef27b52 If the user did not check out LLVM and request it to be built, it should be a build error. This relies on the user having a successful build of LLVM, but the tests will fail if they dont.
llvm-svn: 42514
2007-10-02 00:19:27 +00:00
Dale Johannesen
e61886cee4 Add sqrt and powi intrinsics for long double.
llvm-svn: 42423
2007-09-28 01:08:20 +00:00
Evan Cheng
0a3651a70d Rename keyword "modify" -> "implicit".
llvm-svn: 42282
2007-09-25 01:48:59 +00:00
Evan Cheng
859720c33b Add CopyCost to TargetRegisterClass. This specifies the cost of copying a value
between two registers in the specific class.

llvm-svn: 42123
2007-09-19 01:35:01 +00:00
Evan Cheng
33c343e06b Bug fix and minor clean up of generated code.
llvm-svn: 42069
2007-09-17 22:26:41 +00:00
Chris Lattner
9a1b882091 regenerate
llvm-svn: 42036
2007-09-17 17:40:48 +00:00
Dan Gohman
53119779c2 Remove spurious consts. This fixes warnings with compilers that
are strict about such things.

llvm-svn: 41956
2007-09-14 20:08:19 +00:00
Evan Cheng
bd4b11cfa9 Initial support for multi-result patterns:
1.
[(set GR32:$dst, (add GR32:$src1, GR32:$src2)),
 (modify EFLAGS)]
This indicates the source pattern expects the instruction would produce 2 values. The first is the result of the addition. The second is an implicit definition in register EFLAGS.
2.
def : Pat<(parallel (addc GR32:$src1, GR32:$src2), (modify EFLAGS)), ()>
Similar to #1 except this is used for def : Pat patterns.

llvm-svn: 41897
2007-09-12 23:30:14 +00:00
Evan Cheng
8c1086ae63 Allow set operators with multiple destinations, i.e. (set x, y, (op a, b)).
llvm-svn: 41861
2007-09-11 19:52:18 +00:00
Chris Lattner
28425ab55f update this to use llvm-config, patch by Jose M. Moya
llvm-svn: 41849
2007-09-11 17:09:54 +00:00