Misha Brukman
95e6287734
Booleans are types too. And they get stored in bytes. And InstructionSelection
...
doesn't assert fail. And everyone's happy. Yay!
llvm-svn: 4792
2002-11-21 00:25:56 +00:00
Chris Lattner
e4dbb1af42
Initial checkin of Module cloning support stuff
...
llvm-svn: 4788
2002-11-20 20:47:41 +00:00
Chris Lattner
c4841a7738
X86 target builds fine now
...
llvm-svn: 4786
2002-11-20 20:17:03 +00:00
Chris Lattner
8016a16ed0
Fix symbol table problem
...
llvm-svn: 4785
2002-11-20 19:32:43 +00:00
Misha Brukman
53d2de923a
Add definitions for function headers from MRegisterInfo.h:
...
Some functions are in X86RegisterInfo.cpp, others, because of the data they
need, are in X86RegisterClasses.cpp, which also defines some register classes:
byte, short, and int.
llvm-svn: 4784
2002-11-20 18:59:43 +00:00
Misha Brukman
6e5d493e0f
Check not only for MO_VirtualRegister, but MO_MachineRegister as well when
...
printing out assembly. After all, we want the real thing too.
llvm-svn: 4783
2002-11-20 18:56:41 +00:00
Misha Brukman
d5b111a10c
Initialize the SSARegMap.
...
llvm-svn: 4782
2002-11-20 18:55:27 +00:00
Chris Lattner
55d5f15a40
Don't build X86 target yet
...
llvm-svn: 4780
2002-11-20 18:37:37 +00:00
Chris Lattner
98cf1f5d64
- Eliminated the deferred symbol table stuff in Module & Function, it really
...
wasn't an optimization and it was causing lots of bugs.
llvm-svn: 4779
2002-11-20 18:36:02 +00:00
Chris Lattner
7c6d9d9eac
Fix minor bugs
...
llvm-svn: 4778
2002-11-20 18:32:31 +00:00
Chris Lattner
b251c3d727
Eliminate the concept of a deferred symbol table. The optimization really isn't,
...
and it causes obscure bugs to show up in passes.
llvm-svn: 4777
2002-11-20 18:07:48 +00:00
Misha Brukman
eaaceb1210
Add mapping in MachineFunction from SSA regs to Register Classes. Also,
...
uncovered a bug where registers were not being put in a map if they were not
found...
llvm-svn: 4776
2002-11-20 00:58:23 +00:00
Misha Brukman
ade1143692
Sigh. Fixed some speling.
...
llvm-svn: 4775
2002-11-20 00:56:42 +00:00
Misha Brukman
310afc5f8c
Thanks to the R8, R16, and R32 macros, I can now deal with registers that
...
belong to different register classes easier.
llvm-svn: 4773
2002-11-20 00:47:40 +00:00
Chris Lattner
84dd0f4767
Remove unneccesary #include
...
llvm-svn: 4772
2002-11-19 23:12:53 +00:00
Chris Lattner
fb311d203a
Implement the CloneFunction function
...
llvm-svn: 4771
2002-11-19 23:12:22 +00:00
Chris Lattner
c362618f2a
Minor changes to cloning interface
...
llvm-svn: 4770
2002-11-19 22:54:01 +00:00
Chris Lattner
8bce9886c3
Fix two fixmes: integrate with inlining, and document
...
llvm-svn: 4769
2002-11-19 22:04:49 +00:00
Chris Lattner
b1120055b9
Rework inline pass to use cloning infrastructure to do the dirty work
...
llvm-svn: 4766
2002-11-19 21:54:07 +00:00
Chris Lattner
1666751257
Start using the new function cloning header
...
llvm-svn: 4764
2002-11-19 20:59:41 +00:00
Chris Lattner
d06467db62
Move MutatStructTypes.h out of IPO
...
llvm-svn: 4762
2002-11-19 20:49:40 +00:00
Chris Lattner
fb8ca4a899
Rename CloneFunction.h to Cloning.h
...
llvm-svn: 4760
2002-11-19 20:08:24 +00:00
Chris Lattner
58f9002b4a
Move the function extractor pass from tools/extract into lib/Xform/IPO
...
llvm-svn: 4759
2002-11-19 18:42:59 +00:00
Chris Lattner
b2e46c0714
Add a new Module::getNamedFunction method
...
llvm-svn: 4758
2002-11-19 18:41:44 +00:00
Brian Gaeke
a648bc6674
Brian Gaeke says:
...
lib/Target/X86/InstSelectSimple.cpp: Add a little something to
visitBranchInst which supports conditional branches.
lib/Target/X86/X86InstrInfo.def: Add defs of JNE, JE, CMPri8
llvm-svn: 4755
2002-11-19 09:08:47 +00:00
Nick Hildenbrandt
e7225c5d3c
*** empty log message ***
...
llvm-svn: 4754
2002-11-18 22:21:52 +00:00
Chris Lattner
f96a218932
Add peak memory usage measurement capability
...
Add (currently disabled) faciility to try to filter out pool allocation overhead from memory usage stats
llvm-svn: 4753
2002-11-18 21:47:09 +00:00
Chris Lattner
79d943eb67
Add peak memory usage measurement stuff
...
Add structure padding optimizations
llvm-svn: 4749
2002-11-18 21:44:46 +00:00
Chris Lattner
63a9e5c068
Add peak memory usage support
...
llvm-svn: 4748
2002-11-18 21:44:19 +00:00
Chris Lattner
77b80616b0
Add stats
...
llvm-svn: 4747
2002-11-18 21:42:45 +00:00
Nick Hildenbrandt
cdf2a1811e
*** empty log message ***
...
llvm-svn: 4745
2002-11-18 20:55:50 +00:00
Chris Lattner
5812f06b30
Start trying to print instructions more correctly. For now we also print out the opcode for each instruction as well.
...
llvm-svn: 4743
2002-11-18 06:56:51 +00:00
Chris Lattner
cf72e52df3
Expose base opcode
...
llvm-svn: 4742
2002-11-18 06:56:24 +00:00
Chris Lattner
0018e8d5fc
Start to add more information to instr.def
...
llvm-svn: 4741
2002-11-18 05:37:11 +00:00
Chris Lattner
f2e00c62ab
Add instruction annotation about whether it has a 0x0F opcode prefix
...
llvm-svn: 4740
2002-11-18 01:59:28 +00:00
Chris Lattner
c6f7457e90
Add more void flags
...
llvm-svn: 4739
2002-11-18 01:37:48 +00:00
Chris Lattner
dbdacac022
Set the void flag on instructions that should get it
...
llvm-svn: 4738
2002-11-18 01:34:36 +00:00
Chris Lattner
d8ea18b695
Print is const!
...
llvm-svn: 4737
2002-11-17 23:22:13 +00:00
Chris Lattner
63d8375f80
Pass on a targetmachine
...
llvm-svn: 4736
2002-11-17 23:22:03 +00:00
Chris Lattner
5fd53046b0
Arrange to have a TargetMachine available in X86InstrInfo::print
...
llvm-svn: 4734
2002-11-17 23:20:37 +00:00
Chris Lattner
b79ccae887
Wow, I'm incapable of the simplest things today...
...
llvm-svn: 4732
2002-11-17 23:05:21 +00:00
Chris Lattner
afce16dec8
Rename registers to follow the intel style of all caps
...
llvm-svn: 4731
2002-11-17 23:03:46 +00:00
Chris Lattner
5961102d31
Fix misleading indentation
...
llvm-svn: 4730
2002-11-17 22:57:23 +00:00
Chris Lattner
9289d7d693
Reorganize printing interface a bit
...
llvm-svn: 4728
2002-11-17 22:53:13 +00:00
Chris Lattner
8693803b48
Add default implementation of printing interface
...
llvm-svn: 4727
2002-11-17 22:53:03 +00:00
Chris Lattner
64c3bb99ed
Fix minor detail
...
llvm-svn: 4725
2002-11-17 22:33:26 +00:00
Chris Lattner
29a320bfcf
Add hack to only consider indirect calls indirect if they do more than cast
...
their source function
llvm-svn: 4723
2002-11-17 22:17:12 +00:00
Chris Lattner
1e3652955b
Add MaxSCC statistics
...
llvm-svn: 4722
2002-11-17 22:16:28 +00:00
Chris Lattner
342f68151e
Count CallInsts correctly, remove unneccesary initializers
...
S: ----------------------------------------------------------------------
llvm-svn: 4721
2002-11-17 22:15:40 +00:00
Chris Lattner
17ec8a8dd0
Remove only uses of markDef/markDefAndUse methods
...
llvm-svn: 4719
2002-11-17 22:14:08 +00:00
Chris Lattner
cb57e5ca17
Fix Mul/Div clobbers
...
llvm-svn: 4718
2002-11-17 21:56:38 +00:00
Chris Lattner
ecdb49d74a
Fix a few typos, implement load/store
...
llvm-svn: 4716
2002-11-17 21:11:55 +00:00
Chris Lattner
c682b4a9ab
Add functions to buld X86 specific constructs
...
llvm-svn: 4714
2002-11-17 21:03:35 +00:00
Chris Lattner
6fd0ef303d
Add information about memory index representation
...
llvm-svn: 4712
2002-11-17 20:33:26 +00:00
Chris Lattner
e86f98e06c
Add load/store instructions
...
llvm-svn: 4711
2002-11-17 20:33:12 +00:00
Chris Lattner
09fddd97fb
Switch visitRet to use getClass()
...
llvm-svn: 4710
2002-11-17 20:07:45 +00:00
Brian Gaeke
e74543584a
include/llvm/CodeGen/MachineInstrBuilder.h: Add addClobber() inline
...
convenience method. Fix typo in comment.
lib/Target/X86/InstSelectSimple.cpp: Explicitly specify some implicit uses.
Use MOVZX/MOVSX instead of MOV instructions with sign extend instructions.
Take out LEAVE instructions.
32-bit IDIV and DIV use CDQ, not CWQ (CWQ is a typo).
Fix typo in comment and remove some FIXME comments.
lib/Target/X86/Printer.cpp: Include X86InstrInfo.h and llvm/Function.h.
Add some simple code to Printer::runOnFunction to iterate over
MachineBasicBlocks and call X86InstrInfo::print().
lib/Target/X86/X86InstrInfo.def: Make some more instructions with
implicit defs "Void". Add more sign/zero extending "move" insns
(movsx, movzx).
lib/Target/X86/X86RegisterInfo.def: Add EFLAGS as a register.
llvm-svn: 4707
2002-11-14 22:32:30 +00:00
Dinakar Dhurjati
a7be9a7db7
Gives the count for various instructions.
...
llvm-svn: 4706
2002-11-13 18:22:13 +00:00
Vikram S. Adve
16eac628f4
Pass to compute various statisics related to DSGraphs.
...
For now, this just computes the #indirect call sites and
the avg. #callees per indirect call site (actually it prints
both totals and the average is their ratio).
llvm-svn: 4705
2002-11-13 15:41:00 +00:00
Chris Lattner
7a3c0671da
Fix bug: 2002-11-13-PointerFunction.ll
...
This should fix codegen on vortex to work much better
llvm-svn: 4704
2002-11-13 06:54:20 +00:00
Chris Lattner
ccc27ecd35
Inline graphs from outside the SCC into the SCC before SCC resolution starts
...
llvm-svn: 4701
2002-11-12 15:58:08 +00:00
Chris Lattner
dcb4ac9594
Fix two bugs:
...
* The globals vector was getting broken and unsorted, this caused vortex
to get badly pessimized
* Node offset handling was being handled really poorly, and in particular
we were not merging types with offsets right. This causes several graphs
to be non-merged.
llvm-svn: 4699
2002-11-12 07:20:45 +00:00
Chris Lattner
1aeca4d0e6
Fix bug
...
llvm-svn: 4697
2002-11-11 22:23:56 +00:00
Chris Lattner
eb10d4cbce
Handle a mismatch between # function args and call site args
...
llvm-svn: 4696
2002-11-11 21:36:05 +00:00
Chris Lattner
8aed9820e2
Elimiante calls to a node with nothing in it.
...
llvm-svn: 4695
2002-11-11 21:35:38 +00:00
Chris Lattner
59821c5ce6
Complete rewrite of BU code to use Tarjan's SCC finding algorithm to drive
...
the algorithm instead of hand coded depth first iteration
llvm-svn: 4694
2002-11-11 21:35:13 +00:00
Brian Gaeke
b2687880e2
InstSelectSimple.cpp: (visitReturnInst) Add return instructions with return
...
values.
X86InstrInfo.def: add LEAVE instruction.
llvm-svn: 4691
2002-11-11 19:37:09 +00:00
Chris Lattner
dd3dd4abeb
Mark stuff reachable by _AUX_ calls as incomplete in the BU graph
...
llvm-svn: 4690
2002-11-11 03:36:55 +00:00
Chris Lattner
cca3599c0b
Fix infinite loop in the BU algorithm. Unfortunately this dies a serious
...
death when handling moderately sized SCC's, but what can you do
llvm-svn: 4689
2002-11-11 00:01:34 +00:00
Chris Lattner
773da868a0
Print the right call set size
...
llvm-svn: 4688
2002-11-11 00:01:02 +00:00
Chris Lattner
6fa9a7f7f4
Use call site mergeWith method to simplify code
...
llvm-svn: 4687
2002-11-11 00:00:46 +00:00
Chris Lattner
d7f9f635ec
Fix a bug that could trigger when varargs call sites had non-matching number of arguments
...
llvm-svn: 4683
2002-11-10 07:46:08 +00:00
Chris Lattner
7b61563d99
* Dramatically rework liveness evaluation.
...
* Implement the first step of the Globals graph: Deleting nodes from function
graphs. In practice, these nodes need to be moved to the globals graph, but
this will be taken care of later. Note that the graphs computed right now are
not strictly correct!
llvm-svn: 4681
2002-11-10 06:59:55 +00:00
Chris Lattner
e79ce7d359
Honor the shouldPrintAuxCalls flag
...
llvm-svn: 4678
2002-11-10 06:53:59 +00:00
Chris Lattner
17da287408
Initialize PrintAuxCalls member
...
llvm-svn: 4677
2002-11-10 06:53:38 +00:00
Chris Lattner
3b83d797d6
* Bottom-Up graphs print the Aux call vector
...
* Significantly improve DEBUG output
* Aggressively fold calls together if we inlined a graph that provides
call nodes.
* Add a bailout if the current graph has over 200 call nodes in it, this is
a really whacky case that should never happen.
llvm-svn: 4675
2002-11-10 06:52:47 +00:00
Chris Lattner
52b8fc0c35
Fix testcase: FunctionResolve/2002-11-09-ExternFn.ll
...
llvm-svn: 4668
2002-11-10 03:36:55 +00:00
Chris Lattner
715a3a3b5c
eliminate the ability to remove global nodes from deadNodeElminate... for now.
...
This slows stuff down a bit, but it should get much better before it gets any
worse.
llvm-svn: 4666
2002-11-09 22:07:02 +00:00
Chris Lattner
3e32cd8e8b
Remove obsolete code
...
llvm-svn: 4665
2002-11-09 21:41:44 +00:00
Chris Lattner
d185d2ce9d
Fix logic
...
llvm-svn: 4664
2002-11-09 21:40:58 +00:00
Chris Lattner
4b1be35569
Add globals graphs to all three passes
...
llvm-svn: 4663
2002-11-09 21:12:07 +00:00
Chris Lattner
0de21ea32d
Move maskNodeTypes to header file
...
llvm-svn: 4661
2002-11-09 21:02:26 +00:00
Chris Lattner
380d1ad4ab
Clean up DSGraph::removeDeadNodes interface
...
llvm-svn: 4660
2002-11-09 21:00:49 +00:00
Chris Lattner
e703c52b20
Make removeTriviallyDeadNodes a private interface of DSGraph
...
llvm-svn: 4659
2002-11-09 20:55:24 +00:00
Chris Lattner
2dd1adafa6
Don't put constants into the scalar map!
...
llvm-svn: 4657
2002-11-09 20:14:03 +00:00
Chris Lattner
e742f31e0c
Add initial support for a globals graph
...
llvm-svn: 4656
2002-11-09 20:01:01 +00:00
Chris Lattner
5737a600d7
Tighten up array handling
...
llvm-svn: 4655
2002-11-09 19:25:27 +00:00
Chris Lattner
bcc12023ce
#include Datastructure.h first
...
llvm-svn: 4654
2002-11-09 19:25:10 +00:00
Chris Lattner
a2620ac156
Fix warning
...
llvm-svn: 4649
2002-11-09 00:49:43 +00:00
Chris Lattner
63aeefeafb
Fix warning & release build
...
llvm-svn: 4648
2002-11-09 00:49:05 +00:00
Chris Lattner
0da31d6648
Fix spelling error
...
llvm-svn: 4645
2002-11-08 23:18:37 +00:00
Chris Lattner
be46569ba1
Fold arrays down to a single element. This causes huge wins on some benchmarks
...
for example: 197.parser (64M->14M), 164.gzip (14M->2.7M). The actual graphs
represented should not change at all.
llvm-svn: 4643
2002-11-08 22:49:57 +00:00
Chris Lattner
09a21dc2f5
ONLY merge in the aux call sites, this causes a HUGE speedup
...
llvm-svn: 4640
2002-11-08 22:27:25 +00:00
Chris Lattner
56363a05e6
Allow specification of whether the call sites should be copied, AND whether
...
the aux call sites should be copied
llvm-svn: 4639
2002-11-08 22:27:09 +00:00
Chris Lattner
ef305cec98
Reenable 'quick exit' case
...
llvm-svn: 4638
2002-11-08 22:26:43 +00:00
Chris Lattner
2ea00e994e
Reduce amount of work needed to compute ip/modref
...
llvm-svn: 4637
2002-11-08 22:17:01 +00:00
Chris Lattner
0c2f4bab3a
Reimplement TD pass completely it now works
...
llvm-svn: 4635
2002-11-08 21:28:37 +00:00
Chris Lattner
a06ac62a5e
Cannot modify original call sites vector
...
llvm-svn: 4634
2002-11-08 21:27:37 +00:00
Chris Lattner
c20122732e
- Add a bunch of checking to make sure that dead nodes are not used after they
...
are marked DEAD. This helped track down some bugs
- Fix a bunch of bugs where we were doing work on nodes after they became dead
- Add support for aux function call sites
- Add support for not cloning call sites
llvm-svn: 4633
2002-11-08 21:27:12 +00:00
Chris Lattner
639898c9bb
Remove gunk used by broken TD pass
...
llvm-svn: 4632
2002-11-08 21:25:24 +00:00
Chris Lattner
17069b342a
Use the new getMainFunction() method to efficiently locate main
...
llvm-svn: 4630
2002-11-08 20:34:21 +00:00
Chris Lattner
1f985e0d3c
Add a method "getMainFunction()" that efficiently locates 'main' in a module
...
llvm-svn: 4629
2002-11-08 20:34:02 +00:00
Chris Lattner
465668552a
Fix IPModRef to use new DS interface
...
llvm-svn: 4628
2002-11-08 19:13:14 +00:00
Chris Lattner
7a1da7c850
Implement feof
...
llvm-svn: 4627
2002-11-08 19:10:26 +00:00
Chris Lattner
a075a5801b
Use DSNodeHandleMap instead to be safe
...
llvm-svn: 4622
2002-11-08 05:01:14 +00:00
Chris Lattner
5e730ed972
* actually handle constants (especially constantexprs) correctly.
...
- This seems to dramatically improve many benchmarks, only slowing down
gzip significantly.
llvm-svn: 4621
2002-11-08 05:00:44 +00:00
Chris Lattner
b0c9b37048
Add flush
...
llvm-svn: 4619
2002-11-08 01:21:07 +00:00
Chris Lattner
5997c3d866
Fix bug: FunctionResolve/2002-11-07-RetMismatch.ll
...
llvm-svn: 4618
2002-11-08 00:38:20 +00:00
Chris Lattner
060ac498bb
_REALLY_ fix the float constant problem
...
llvm-svn: 4609
2002-11-07 22:12:53 +00:00
Chris Lattner
cffe417a68
Print out 'float' constants correctly
...
llvm-svn: 4607
2002-11-07 19:43:59 +00:00
Chris Lattner
a41a195374
Implement freopen for burg
...
llvm-svn: 4606
2002-11-07 19:33:50 +00:00
Chris Lattner
a2b4c6cc49
Make command line arguments setup be endian correct!!
...
llvm-svn: 4605
2002-11-07 19:29:31 +00:00
Brian Gaeke
9cbe229704
Add instruction selection code and tests for setcc instructions
...
llvm-svn: 4603
2002-11-07 17:59:21 +00:00
Chris Lattner
5904e63465
Implement ResolveCallSiteModRefInfo for IPModRef. computeModRef is not yet done though!
...
llvm-svn: 4602
2002-11-07 07:12:23 +00:00
Chris Lattner
5e865cdbe2
Instead of using a bool that constant has to be explained, use a self
...
explanitory enum instead.
llvm-svn: 4600
2002-11-07 07:06:20 +00:00
Chris Lattner
df307e6fd0
Implement a new mergeInGraph method, which basically factors code out of
...
the BU class.
This will be used by the IPModRef class to do stuff, eventually perhaps the
TD pass will use it also.
Speaking of the TD pass, this also eliminates the self recursive case, which
was broken, and couldn't occur anyway.
llvm-svn: 4599
2002-11-07 06:31:54 +00:00
Chris Lattner
ca03c3b516
Rename DataStructureAnalysis namespace to DS
...
llvm-svn: 4596
2002-11-07 05:20:53 +00:00
Chris Lattner
28c34bd8eb
Fix problem with dangling referrers
...
llvm-svn: 4595
2002-11-07 05:00:35 +00:00
Chris Lattner
f9d29b3299
Minor bugfix to enable generation of methcall.llvm.lib, objinst.llvm.lib, and
...
The problem was merging two unsized types like function's, ie int (int*) with
int (uint *)
llvm-svn: 4594
2002-11-07 04:59:28 +00:00
Chris Lattner
c03a377f6a
Compute total number of nodes and # call nodes
...
llvm-svn: 4592
2002-11-07 02:18:46 +00:00
Chris Lattner
4f8e2acaa2
Move printouts to be wrapped in DEBUG() macros
...
llvm-svn: 4588
2002-11-07 01:54:56 +00:00
Chris Lattner
2d0081a148
When the -only-print-main-ds option is specified, still print out graph size
...
statistics for skipped functions
llvm-svn: 4587
2002-11-07 01:54:44 +00:00
Chris Lattner
c3a84099a9
Implement fprintf
...
llvm-svn: 4585
2002-11-06 23:05:03 +00:00
Chris Lattner
8529020770
Implement fputc and ungetc to allow burg to run in lli
...
llvm-svn: 4584
2002-11-06 22:59:28 +00:00
Nick Hildenbrandt
642f44fe8e
Fixes escapeing bug in strings. Fixes test case test/Regression/CBackend/2002-11-06-PrintEscaped.c
...
llvm-svn: 4583
2002-11-06 21:40:23 +00:00
Nick Hildenbrandt
d1f273e97b
Loads and stores can't be inlined. This fixes test/Singlesource/matrixTranspose
...
llvm-svn: 4579
2002-11-06 20:07:54 +00:00
Chris Lattner
bac5fec8b9
Allow the ResolveCallSiteModRefInfo method to return a mapping of nodes,
...
implement the mod/ref bit masking
llvm-svn: 4578
2002-11-06 19:59:33 +00:00
Chris Lattner
2b23bf16e3
Add a stub to implement the context sensitive mod/ref info for call sites
...
llvm-svn: 4577
2002-11-06 19:38:43 +00:00
Chris Lattner
3cf08cc08a
Give a back pointer to the IPModRef object to the FunctionModRefInfo object
...
llvm-svn: 4576
2002-11-06 19:07:13 +00:00
Chris Lattner
2f05c9a206
Remove a couple of #includes, move some code from .h file
...
llvm-svn: 4575
2002-11-06 18:38:18 +00:00
Chris Lattner
92acbcda99
Change Steens class to build with Vikram's changes
...
llvm-svn: 4572
2002-11-06 18:08:32 +00:00
Chris Lattner
2b79f4b7c3
Make PointerSize & Shift be enums
...
Fix problem with recursive merging
llvm-svn: 4570
2002-11-06 18:01:39 +00:00
Vikram S. Adve
075a8d7341
Make query operations non-const to allow demand-driven analyses.
...
llvm-svn: 4569
2002-11-06 17:17:55 +00:00
Vikram S. Adve
36da63f19f
An interprocedural analysis pass that computes flow-insensitive
...
IP Mod and Ref information for every function and every call site.
llvm-svn: 4567
2002-11-06 17:02:03 +00:00
Chris Lattner
48e37d9b97
Dramatically simplify internal DSNode representation, get implementation
...
*FULLY OPERATIONAL* and safe. We are now capable of completely analyzing
at LEAST the Olden benchmarks + 181.mcf
llvm-svn: 4562
2002-11-06 06:20:27 +00:00
Chris Lattner
230f6926b0
Delete "StripScalars" argument to cloneInto method
...
llvm-svn: 4560
2002-11-06 06:16:30 +00:00
Vikram S. Adve
a281003e5e
Remove a nasty little semi-colon someone introduced which
...
prevented any machine instrs from being printed!
llvm-svn: 4557
2002-11-06 00:34:26 +00:00
Chris Lattner
6c213d673b
Attempted fixes to the mergemap to make it work better.
...
Ended up disabling merge map merging completely. It shall be removed.
llvm-svn: 4550
2002-11-05 00:01:58 +00:00
Chris Lattner
2ce8c6890b
Simplify code
...
llvm-svn: 4547
2002-11-04 21:06:54 +00:00
Chris Lattner
d8be7b01f9
Sun can now use mallinfo()
...
llvm-svn: 4546
2002-11-04 21:05:21 +00:00
Chris Lattner
a416ad30df
No need to explicitly inclue ExportSymbols now
...
llvm-svn: 4543
2002-11-04 20:50:57 +00:00
Chris Lattner
32856be0f0
Allow memory sizes to be negative, remove obsolete TmpRSS field
...
llvm-svn: 4538
2002-11-04 19:19:36 +00:00
Chris Lattner
203be1a568
mallinfo is not available on sun apparently :(
...
llvm-svn: 4537
2002-11-04 19:01:41 +00:00
Chris Lattner
5d606a09ff
Instcombine this away:
...
%A = getelementptr [4 x int]* %M, long 0, long 0
%B = getelementptr int* %A, long 2
llvm-svn: 4536
2002-11-04 16:43:32 +00:00
Chris Lattner
1085bdf49f
Add a transformation to turn:
...
malloc Ty, C
int
malloc [C x Ty], 1
llvm-svn: 4534
2002-11-04 16:18:53 +00:00
Vikram S. Adve
5beed607f4
Simple passes that print out SCCs in the CFGs or in the CallGraph of a module.
...
llvm-svn: 4532
2002-11-04 14:20:22 +00:00
Chris Lattner
7e8b76009f
Change the "Cannot merge two portions of the same node yet" from an assertion
...
into a "oh crap, lets collapse" case
llvm-svn: 4530
2002-11-04 06:48:26 +00:00
Chris Lattner
0544dadbee
Ack: Fix bug in previous checkin.
...
llvm-svn: 4526
2002-11-04 05:50:42 +00:00
Chris Lattner
4262f815b5
Be more generous about level raising constant expressions don't force each
...
constant to one particular type.
llvm-svn: 4525
2002-11-04 05:46:37 +00:00
Chris Lattner
669c6cf459
Make sure to _delete_ memory allocated by worklists
...
llvm-svn: 4523
2002-11-04 02:54:22 +00:00
Chris Lattner
cd691d2047
Give a better error message in an unhandled case
...
llvm-svn: 4521
2002-11-04 02:29:15 +00:00
Chris Lattner
ee792946bb
Minor fix to space accounting
...
llvm-svn: 4520
2002-11-04 01:49:45 +00:00
Chris Lattner
559f5118d1
Implement MaxRSS in terms of mallinfo instead of the system RSS. This gives
...
us much more accurate numbers and actually WORKS.
llvm-svn: 4518
2002-11-04 00:32:44 +00:00
Chris Lattner
b9d55473b5
Allow the call graph to be called from analyze naturally with print implemented
...
llvm-svn: 4517
2002-11-04 00:21:19 +00:00
Chris Lattner
a20fabc7ec
Rename ValueMap to ScalarMap
...
llvm-svn: 4516
2002-11-03 21:27:48 +00:00
Chris Lattner
bd7af8e664
Rename NewNode flag to HeapNode
...
llvm-svn: 4515
2002-11-03 21:24:04 +00:00
Chris Lattner
4b6a813048
Change the letters used to represent stack and heap allocations to "S" and "H"
...
respectively. This is to make presentation easier in the paper.
llvm-svn: 4514
2002-11-03 19:46:15 +00:00
Anand Shukla
320febba68
code to lightly instrument at branches
...
llvm-svn: 4511
2002-11-03 01:45:20 +00:00
Chris Lattner
36051c0c56
Move function to cpp file from header
...
llvm-svn: 4510
2002-11-02 22:07:51 +00:00
Chris Lattner
781986c436
Implement signed and unsigned division and remainder
...
llvm-svn: 4508
2002-11-02 20:54:46 +00:00
Chris Lattner
d12e1bc777
Implement multiply operator
...
llvm-svn: 4506
2002-11-02 20:28:58 +00:00
Chris Lattner
e823fb32f4
* Implement subtract
...
* Merge add code into logical code
llvm-svn: 4503
2002-11-02 20:13:22 +00:00
Chris Lattner
dd873d2179
shuffle code around a bit, implement and, or, xor
...
llvm-svn: 4502
2002-11-02 20:04:26 +00:00
Chris Lattner
abe3280ad9
Add PHI node support, add comment for branch function
...
llvm-svn: 4500
2002-11-02 19:45:49 +00:00
Chris Lattner
16af2d5aa8
Implement unconditional branching support
...
llvm-svn: 4498
2002-11-02 19:27:56 +00:00
Chris Lattner
cfb187f6bb
* Fix nonconstant shift case
...
* Turn table into 2d table
llvm-svn: 4496
2002-11-02 01:41:55 +00:00
Chris Lattner
ff3d28f403
Use a more table driven approach to handling types. Seems to simplify the
...
code a bit
llvm-svn: 4493
2002-11-02 01:15:18 +00:00
Chris Lattner
63f4e752cd
Make switch statements denser, but only because of the follow-on patch
...
llvm-svn: 4492
2002-11-02 00:49:56 +00:00
Chris Lattner
122b73b7a6
* Remove dead variable
...
* Shift amount is always guaranteed to be 8 bits
llvm-svn: 4491
2002-11-02 00:44:25 +00:00
Chris Lattner
63ba1aca7c
Implement the "unknown flag" which mainly consists of aligning printing code
...
llvm-svn: 4490
2002-11-02 00:36:03 +00:00
Chris Lattner
364e6e82fd
Oops, this was not meant to be checked in
...
llvm-svn: 4489
2002-11-02 00:26:32 +00:00
Chris Lattner
a7b0d4eb08
Stop representing scalars as explicit nodes in the graph. Now the only
...
nodes in the graph are memory objects, which is very nice. This also greatly
reduces the size and memory footprint for DSGraphs. For example, the local
DSGraph for llu went from 65 to 13 nodes with this change. As a side bonus,
dot seems to lay out the graphs slightly better too. :)
llvm-svn: 4488
2002-11-02 00:13:20 +00:00
Nick Hildenbrandt
5c5e78482e
Fixed bug in Regression/CBackend/2002-10-30-FunctionPointerAlloca.ll
...
llvm-svn: 4486
2002-11-01 17:37:09 +00:00
Chris Lattner
8a1854fc47
Fix comments, steens is context sensitive, we just haven't implemented
...
mod/ref apis yet
llvm-svn: 4485
2002-11-01 17:34:23 +00:00
Chris Lattner
dcf31cec85
New iostream definitions
...
llvm-svn: 4482
2002-11-01 16:46:05 +00:00
Chris Lattner
36c05c8f69
Make sure to include name information if we have it
...
llvm-svn: 4481
2002-11-01 04:49:06 +00:00
Chris Lattner
8c68d869e5
Add a fixme
...
llvm-svn: 4479
2002-10-31 23:24:00 +00:00
Brian Gaeke
6e2d676829
InstSelectSimple.cpp: Include llvm/iOther.h for ShiftInst.
...
Add ISel::visitShiftInst() to instruction select shift instructions.
Add a comment in visitAdd about how to do 64 bit adds.
X86InstrInfo.def: Add register-to-register move opcodes and shift opcodes.
llvm-svn: 4477
2002-10-31 23:03:59 +00:00
Chris Lattner
c1d8820711
* Minor optimization: when merging nodes, merge the smaller one into the
...
larger one.
* Handle the case where we are merging two nodes of different size better.
llvm-svn: 4476
2002-10-31 22:41:15 +00:00
Chris Lattner
8cdd50d177
Reassociate pass now works
...
llvm-svn: 4473
2002-10-31 17:16:18 +00:00
Chris Lattner
8fdf75cde5
Fixes to the reassociate pass to make it respect dominance properties
...
Huge thanks go to Casey Carter for writing this fix, reassociate is now
reoperational!
llvm-svn: 4471
2002-10-31 17:12:59 +00:00
Chris Lattner
4d2997f25d
Fix nasty bug in ::isNeg()
...
llvm-svn: 4470
2002-10-31 17:09:06 +00:00
Vikram S. Adve
8c7b93f7e3
Restore support for indirect function calls (which briefly wasn't working
...
after I removed annotations on MachineInstr for the CallDescriptor).
llvm-svn: 4469
2002-10-31 15:34:48 +00:00
Chris Lattner
5d428a0029
Remove dead code
...
llvm-svn: 4467
2002-10-31 06:52:26 +00:00
Chris Lattner
7d5f19886d
This fixes all kinds of problems with array handling. There are still bugs to
...
be fixed, but we are getting much closer now.
* Make DSNode::TypeRec a full fledged DSTypeRec type.
* Add methods used to update and access the typerecords elements
* Add methods to query if and to cause a node to be completely folded
* DSGraph construction doesn't use the allocation type for anything at all,
now nodes get their type information based on how they are used.
* Fixed a bug with global value handling introduced in the last checkin
* GEP support is now much better, arrays are handled correctly. The array
flag is now updated in type records. There are still cases that are not
handled yet (we do not detect pessimizations), but getting much closer.
llvm-svn: 4465
2002-10-31 05:45:02 +00:00
Chris Lattner
f6cfaedcff
Can simplify code now with the isCommutative() method.
...
llvm-svn: 4461
2002-10-31 04:24:23 +00:00
Chris Lattner
d1998c4aea
Use new isCommutative interface, which gives us SetEQ and SetNE for free.
...
Thanks fly out to Casey Carter for this fix.
llvm-svn: 4460
2002-10-31 04:20:07 +00:00
Chris Lattner
cab6c33811
New isAssociative/isCommutative inspection methods, graciously contributed by
...
Casey Carter.
llvm-svn: 4459
2002-10-31 04:14:01 +00:00
Chris Lattner
12764c85e8
BreakCriticalEdges should update dominance frontier information as well as
...
other dominance stuff. Patch contributed by Casey Carter
llvm-svn: 4457
2002-10-31 02:44:36 +00:00
Chris Lattner
61596ad266
Fix two problems:
...
* Load Implementation can cause unaligned memory accesses, which caused
problems for sparc.
* cast from pointer to pointer would zero the upper 32 bits of the pointer
which obviously causes problems on 64 bit hosts.
llvm-svn: 4454
2002-10-30 21:47:57 +00:00
Vikram S. Adve
9f205ddfdd
In getID(), don't call getValidSymbolName to mangle external names!
...
llvm-svn: 4451
2002-10-30 20:16:38 +00:00
Chris Lattner
6c34c0baf5
Add lots more info
...
llvm-svn: 4450
2002-10-30 06:04:46 +00:00
Chris Lattner
6c614a9931
Remove fixme
...
llvm-svn: 4447
2002-10-30 02:02:37 +00:00
Chris Lattner
ac6e97410b
Add special code to make printing SSA form machine instructions nicer
...
llvm-svn: 4446
2002-10-30 01:55:38 +00:00
Chris Lattner
c9e1efd0f8
Make sure to set the destination register correctly
...
llvm-svn: 4444
2002-10-30 01:49:01 +00:00
Chris Lattner
87b84a6913
Set the destination register field based on the target specific flags
...
llvm-svn: 4442
2002-10-30 01:15:31 +00:00
Chris Lattner
60c59d5b4e
Add flag to specify when no value is produced by an instruction
...
llvm-svn: 4441
2002-10-30 01:09:34 +00:00
Chris Lattner
c1d7563566
Sparc backend doesn't use target specific flags yet
...
llvm-svn: 4440
2002-10-30 01:07:12 +00:00
Chris Lattner
4e9fb1f52e
Use MRegisterInfo, if available, to print symbolic register names
...
llvm-svn: 4438
2002-10-30 00:58:19 +00:00
Chris Lattner
858a4a6595
Implement the new optional getRegisterInfo
...
llvm-svn: 4437
2002-10-30 00:56:18 +00:00
Chris Lattner
214808f8ac
Implement structured machine code printing
...
llvm-svn: 4435
2002-10-30 00:48:05 +00:00
Chris Lattner
d7a855668d
Print machine code after instruction selection
...
llvm-svn: 4434
2002-10-30 00:47:49 +00:00
Chris Lattner
e3ceb17d54
Make sure to pass the LLVM basic block in
...
llvm-svn: 4433
2002-10-30 00:47:40 +00:00
Chris Lattner
7ee171b717
Construct annotation, to make sure it's attached to function
...
llvm-svn: 4429
2002-10-29 23:40:58 +00:00
Chris Lattner
90e64905b9
Make argsize calculation stuff optional, so that Targets without FrameInfo
...
objects yet don't die
llvm-svn: 4427
2002-10-29 23:40:03 +00:00
Chris Lattner
27ccb70df6
Implement autoinserting ctor
...
llvm-svn: 4426
2002-10-29 23:19:00 +00:00
Chris Lattner
bbd68ada1a
Rename annotation id
...
llvm-svn: 4425
2002-10-29 23:18:43 +00:00
Misha Brukman
632df28deb
Fix spelling of `propagate'.
...
llvm-svn: 4423
2002-10-29 23:06:16 +00:00
Chris Lattner
02a3d837c2
Convert backend to use passes, implement X86TargetMachine
...
llvm-svn: 4421
2002-10-29 22:37:54 +00:00
Chris Lattner
e2ac271173
These are no longer virtual methods
...
llvm-svn: 4420
2002-10-29 22:01:44 +00:00
Chris Lattner
b848956370
* Privatize the TargetName
...
* Move optSizeForSubWordData to TargetData
* Remove unused fields
llvm-svn: 4417
2002-10-29 21:48:17 +00:00
Chris Lattner
abd7fdcb99
Implement findOptimalStorageSize a bit more generally
...
llvm-svn: 4416
2002-10-29 21:47:50 +00:00
Chris Lattner
5667f0eefd
Allow TargetMachine to refuse static code gen
...
llvm-svn: 4415
2002-10-29 21:12:46 +00:00
Chris Lattner
27d247978b
Rename X86InstructionInfo to X86InstrInfo
...
llvm-svn: 4413
2002-10-29 21:05:24 +00:00
Chris Lattner
f57420ee17
Minor renaming
...
llvm-svn: 4410
2002-10-29 20:48:56 +00:00
Chris Lattner
69127c68ed
Remove unneccesary #includes
...
llvm-svn: 4408
2002-10-29 20:47:46 +00:00
Chris Lattner
71b6d491db
Rename Sparc.h to TargetMachineImpls.h
...
llvm-svn: 4407
2002-10-29 20:47:26 +00:00
Chris Lattner
ec1dcd0849
Reenable X86 backend, even though it doesn't do much, at least it compiles
...
llvm-svn: 4404
2002-10-29 20:29:34 +00:00
Chris Lattner
f4e4ed7612
Merge with sparc backend
...
llvm-svn: 4403
2002-10-29 20:10:58 +00:00
Chris Lattner
8d3e9ab2cf
X86 merge is complete, eliminate unused code
...
llvm-svn: 4400
2002-10-29 20:07:16 +00:00
Vikram S. Adve
a1b4f0f85e
Remove separate vector of implicit refs from MachineInstr, and
...
instead record them as extra operands in the operands[] vector.
Also, move CallArgsDescriptor into this class instead of making it an
annotation on the machine instruction.
llvm-svn: 4399
2002-10-29 19:41:18 +00:00
Vikram S. Adve
db6596e551
Move CallArgsDescriptor into this class instead of making it an
...
annotation on the machine instruction.
llvm-svn: 4398
2002-10-29 19:38:46 +00:00
Vikram S. Adve
ea0d174f1a
Bug fix: align size for dynamic allocas according to stack pointer
...
alignment restrictions. This is incomplete for one case.
llvm-svn: 4397
2002-10-29 19:37:31 +00:00
Chris Lattner
2990e9b6cd
Switch to generating machineinstr's instead of MInstructions
...
llvm-svn: 4396
2002-10-29 17:43:55 +00:00
Chris Lattner
6c3f9c1b8f
Be compatible with sparc backend
...
llvm-svn: 4395
2002-10-29 17:43:38 +00:00
Chris Lattner
16cbd41c21
Implement MachineInstrInfo interface
...
llvm-svn: 4394
2002-10-29 17:43:19 +00:00
Chris Lattner
f4b122dbc5
Switch to different flag set
...
llvm-svn: 4393
2002-10-29 17:42:40 +00:00
Chris Lattner
07e26837a9
Move TargetInstrDescriptors extern to the one .cpp file that refers to it:
...
MachineInstr.cpp
llvm-svn: 4392
2002-10-29 17:40:30 +00:00
Chris Lattner
268d600a88
Move TargetInstrDescriptors to MachineInstrInfo.cpp
...
llvm-svn: 4391
2002-10-29 17:37:48 +00:00
Chris Lattner
52ce69b8e2
*** empty log message ***
...
llvm-svn: 4390
2002-10-29 17:35:41 +00:00
Chris Lattner
660bf10981
Use higher level methods, don't use TargetInstrDescriptors directly!
...
llvm-svn: 4389
2002-10-29 17:35:39 +00:00
Chris Lattner
50ef1010c0
Use higher level method
...
llvm-svn: 4386
2002-10-29 17:25:41 +00:00
Chris Lattner
76014b97af
Remove #include, misleading comment, and a typedef used only once
...
llvm-svn: 4383
2002-10-29 17:08:05 +00:00
Chris Lattner
6d6d87f3f3
Inline typedef, eliminate unused method
...
llvm-svn: 4382
2002-10-29 17:03:19 +00:00
Chris Lattner
ca0f818347
Remove long dead #if 0
...
llvm-svn: 4381
2002-10-29 17:00:19 +00:00
Chris Lattner
5abe44bb72
Add #includes that were eliminated from headers
...
llvm-svn: 4380
2002-10-29 16:51:05 +00:00
Chris Lattner
189c099a7f
De-inline methods
...
llvm-svn: 4379
2002-10-29 16:50:33 +00:00
Chris Lattner
c9e9d2933d
Remove #include
...
llvm-svn: 4378
2002-10-29 16:50:20 +00:00
Chris Lattner
e9bda57b87
Remove unneeded #include
...
llvm-svn: 4377
2002-10-29 16:50:06 +00:00
Chris Lattner
a13000449e
Remove forward decl
...
llvm-svn: 4376
2002-10-29 16:49:44 +00:00
Chris Lattner
7ecc7af4bd
Make assertIGNode be private to the InterferenceGraph.cpp file
...
llvm-svn: 4375
2002-10-29 16:42:34 +00:00
Chris Lattner
01efae0bbf
MachineInstrInfo doesn't need a TargetMachine
...
llvm-svn: 4372
2002-10-29 15:45:20 +00:00
Chris Lattner
5cbb8183d6
Don't build X86 target until it builds properly again
...
llvm-svn: 4369
2002-10-28 23:56:41 +00:00
Chris Lattner
910b82f042
Seperate code out of TargetMachine into MachineInstrInfo
...
llvm-svn: 4368
2002-10-28 23:55:33 +00:00
Chris Lattner
1303f2f057
Initial stab at MachineInstr'ication
...
llvm-svn: 4367
2002-10-28 23:55:19 +00:00
Chris Lattner
820b037815
MachineInstrInfo no longer #includes this header, so we must
...
llvm-svn: 4366
2002-10-28 23:54:47 +00:00
Chris Lattner
cbe6385890
Use BuildMI instead of explicit code.
...
llvm-svn: 4362
2002-10-28 21:43:57 +00:00
Chris Lattner
5c7d638208
Remove all traces of the "Opcode Mask" field in the MachineInstr class
...
llvm-svn: 4359
2002-10-28 21:17:20 +00:00
Chris Lattner
bee314fc94
Remove more default arguments that are never used
...
llvm-svn: 4358
2002-10-28 21:02:40 +00:00
Chris Lattner
307fb1a314
Remove default operands that are never used
...
llvm-svn: 4357
2002-10-28 20:59:49 +00:00