Chris Lattner
f83aae613c
rename TargetInstrDescriptor -> TargetInstrDesc.
...
Make MachineInstr::getDesc return a reference instead
of a pointer, since it can never be null.
llvm-svn: 45695
2008-01-07 07:27:27 +00:00
Chris Lattner
57e851edfe
Rename all the M_* flags to be namespace qualified enums, and switch
...
all clients over to using predicates instead of these flags directly.
These are now private values which are only to be used to statically
initialize the tables.
llvm-svn: 45692
2008-01-07 06:42:05 +00:00
Chris Lattner
9b987de2c5
rename hasVariableOperands() -> isVariadic(). Add some comments.
...
Evan, please review the comments I added to getNumDefs to make sure
that they are accurate, thx.
llvm-svn: 45687
2008-01-07 05:19:29 +00:00
Chris Lattner
b0e50db817
Move M_* flags down in the file. Move SchedClass up in the
...
TargetInstrDescriptor class and shrink to 16-bits, saving a
word in TargetInstrDescriptor. Add some comments.
llvm-svn: 45686
2008-01-07 05:06:49 +00:00
Chris Lattner
26171363b9
the name field of instructions is never set to a non-empty string,
...
just unconditionally use the def name of the instruction.
llvm-svn: 45684
2008-01-07 04:57:31 +00:00
Chris Lattner
93e1e6ee12
Add predicates methods to TargetOperandInfo, and switch all clients
...
over to using them, instead of diddling Flags directly. Change the
various flags from const variables to enums.
llvm-svn: 45677
2008-01-07 02:39:19 +00:00
Chris Lattner
14310afe42
rename isLoad -> isSimpleLoad due to evan's desire to have such a predicate.
...
llvm-svn: 45667
2008-01-06 23:38:27 +00:00
Chris Lattner
5489888580
rename isStore -> mayStore to more accurately reflect what it captures.
...
llvm-svn: 45656
2008-01-06 08:36:04 +00:00
Chris Lattner
8b4b75c771
Change the 'isStore' inferrer to look for 'SDNPMayStore'
...
instead of "ISD::STORE". This allows us to mark target-specific dag
nodes as storing (such as ppc byteswap stores). This allows us to remove
more explicit isStore flags from the .td files.
Finally, add a warning for when a .td file contains an explicit
isStore and tblgen is able to infer it.
llvm-svn: 45654
2008-01-06 06:44:58 +00:00
Chris Lattner
01d46ed7cc
set the 'isstore' flag for instructions whose pattern is an
...
intrinsic that writes to memory.
llvm-svn: 45650
2008-01-06 05:36:50 +00:00
Chris Lattner
ed75a9c636
remove some old hacky code that tried to infer whether a store
...
occured in a pattern, but failed miserably. The new code works for
any instruction that has a store in its pattern, including all the
x86 mem op mem instructions.
The only target-independent code that uses this is branch folding,
so this won't change anything in practice.
llvm-svn: 45648
2008-01-06 02:16:26 +00:00
Chris Lattner
51500436de
rearrange some code to allow inferring instr info from the pattern of the instr, but don't do so yet.
...
llvm-svn: 45647
2008-01-06 01:53:37 +00:00
Chris Lattner
7414f541ca
improve const correctness.
...
llvm-svn: 45646
2008-01-06 01:52:22 +00:00
Chris Lattner
e9f0c9b6f9
Split the impl of CodeGenInstruction out to its own .cpp file, add a getName() accessor.
...
llvm-svn: 45645
2008-01-06 01:35:39 +00:00
Chris Lattner
e0f76407f9
final cleanups.
...
llvm-svn: 45644
2008-01-06 01:21:51 +00:00
Chris Lattner
4eecc7c085
further simplifications and cleanup
...
llvm-svn: 45643
2008-01-06 01:20:13 +00:00
Chris Lattner
1d89a5f45d
simplify some code
...
llvm-svn: 45642
2008-01-06 01:12:44 +00:00
Chris Lattner
1a15091e2d
rename CodegenDAGPatterns -> CodeGenDAGPatterns
...
llvm-svn: 45641
2008-01-06 01:10:31 +00:00
Chris Lattner
5675305d1a
split enum emission out from InstrInfoEmitter into it's own tblgen backend.
...
llvm-svn: 45640
2008-01-06 00:49:05 +00:00
Chris Lattner
95fa0c3c8d
fix build on case sensitive file systems.
...
llvm-svn: 45639
2008-01-05 23:37:52 +00:00
Chris Lattner
e61657979a
now that computing CodegenDAGPatterns doesn't implicitly print stuff
...
out, DAGISelEmitter can compute it in its ctor, which simplifies some code.
Now we can use CodegenDAGPatterns in other parts of tblgen that want access
to dag pattern info, woo!
llvm-svn: 45636
2008-01-05 22:58:54 +00:00
Chris Lattner
521466d0d1
move Node Transformation printing from CodeGenDAGPatterns -> DAGISelEmitter.
...
The only difference in output is that we now print them in alphabetical
order instead of reverse alphabetical order.
llvm-svn: 45635
2008-01-05 22:54:53 +00:00
Chris Lattner
2fb8b5aaf9
move predicate printing code from CodeGenDAGPatterns -> DAGISelEmitter.
...
llvm-svn: 45634
2008-01-05 22:43:57 +00:00
Chris Lattner
a66efc2de9
fix a fixme by improving const correctness.
...
llvm-svn: 45633
2008-01-05 22:30:17 +00:00
Chris Lattner
3cd393b5ab
change getQualifiedName to be a global function.
...
Split the pattern parsing code out from the dag isel emitter into it's own file.
No functionality change.
llvm-svn: 45632
2008-01-05 22:25:12 +00:00
Chris Lattner
e71d6a90f1
Change the builtin matcher to emit a decision tree, which should help out
...
the VC++ 'nesting depth' issue.
llvm-svn: 45567
2008-01-04 04:38:35 +00:00
Chris Lattner
17760c87aa
Don't let IntrinsicID be uninitialized if it doesn't match.
...
llvm-svn: 45563
2008-01-04 03:32:52 +00:00
Bill Wendling
26e9579653
Remove the default else. This was ending in code that looked like this:
...
if (!strcmp(Target, "x86")) {
// ...
}
else
IntrinsicID = Intrinsic::not_intrinsic;
llvm-svn: 45557
2008-01-03 23:02:16 +00:00
Chris Lattner
ddf03e12a2
Fix a build problem with VC++ by not doing the target prefix
...
comparison for every builtin. This reduces the depth of
the if/elseif chain dramatically.
llvm-svn: 45500
2008-01-02 21:24:22 +00:00
Chris Lattner
6460f1a60a
tblgen shouldn't include headers from llvm codegen.
...
llvm-svn: 45429
2007-12-30 00:25:23 +00:00
Chris Lattner
c4006845a6
remove attributions from utils.
...
llvm-svn: 45419
2007-12-29 20:37:13 +00:00
Chris Lattner
11718ad357
remove attributions from tools/utils makefiles.
...
llvm-svn: 45414
2007-12-29 20:07:17 +00:00
Ted Kremenek
3ba98109c9
Added special support for stripping CRLF characters that may appear in the
...
output of nm.
llvm-svn: 45341
2007-12-24 08:04:39 +00:00
Bill Wendling
a0b8b2ade7
Modified to support comments better.
...
llvm-svn: 45192
2007-12-19 06:20:05 +00:00
Bill Wendling
06cd90a12f
Ignore shell scripts when doing "dsymutil" call.
...
llvm-svn: 45166
2007-12-18 19:21:52 +00:00
Christopher Lamb
a608afb52e
Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space.
...
llvm-svn: 45082
2007-12-17 01:12:55 +00:00
Bill Wendling
c8c611e88f
Add flags to indicate that there are "never" side effects or that there "may be"
...
side effects for machine instructions.
llvm-svn: 45022
2007-12-14 01:48:59 +00:00
Evan Cheng
c314c2daf1
Oops. Forgot these.
...
llvm-svn: 44969
2007-12-13 00:42:35 +00:00
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