Chris Lattner
5af94066ee
we already know the sectionkind when invoking SelectSectionForGlobal,
...
pass it in instead of recomputing it.
llvm-svn: 76990
2009-07-24 18:42:53 +00:00
Chris Lattner
cc951ce3cb
make SectionForGlobal non-virtual, add a hook for pic16 to do its "address=" hack.
...
llvm-svn: 76989
2009-07-24 18:34:27 +00:00
Evan Cheng
e01fec5446
Make sure thumb2 jumptable entries are aligned.
...
llvm-svn: 76986
2009-07-24 18:20:44 +00:00
Evan Cheng
c4221e9b04
Clean up.
...
llvm-svn: 76984
2009-07-24 18:20:16 +00:00
Evan Cheng
5bab9444f9
Replace use of std::set with SmallPtrSet.
...
llvm-svn: 76983
2009-07-24 18:19:46 +00:00
Chris Lattner
a9c1641014
start refactoring pic16 section selection logic.
...
llvm-svn: 76977
2009-07-24 17:13:27 +00:00
Chris Lattner
37abb9f4ba
move ELF-specific code into ELFTargetAsmInfo.
...
llvm-svn: 76976
2009-07-24 17:02:17 +00:00
Chris Lattner
ad0925f556
tidy up
...
llvm-svn: 76975
2009-07-24 16:53:52 +00:00
Chris Lattner
bd89cc24bb
split the ELF-specific section flag inference-from-name code out
...
into its own helper function.
llvm-svn: 76974
2009-07-24 16:50:24 +00:00
Chris Lattner
6e4d35f825
make SectionFlagsForGlobal a private static function instead of a public
...
virtual one.
llvm-svn: 76973
2009-07-24 16:46:50 +00:00
Chris Lattner
6bb2030fa8
move a method up in the file, GV is always non-null, so remove a check.
...
llvm-svn: 76972
2009-07-24 16:44:01 +00:00
Chris Lattner
7d304b8e4e
There is no need to pass the name into lib/Target/TargetAsmInfo.cpp
...
when we have a global with no section explicitly specified.
llvm-svn: 76971
2009-07-24 16:40:45 +00:00
Daniel Dunbar
b3d81314f6
Another getName -> getNameStr
...
llvm-svn: 76967
2009-07-24 12:21:08 +00:00
Daniel Dunbar
e3fea713f1
Switch to getNameStr().
...
llvm-svn: 76962
2009-07-24 08:24:36 +00:00
Eli Friedman
1be7dfb1aa
Remove unused member functions.
...
llvm-svn: 76960
2009-07-24 07:43:59 +00:00
Chris Lattner
d594b72797
hoist section name uniquing logic up to the top-level SectionForGlobal
...
implementation, eliminating a dupe.
llvm-svn: 76953
2009-07-24 05:10:25 +00:00
Chris Lattner
20d18ee0c4
reduce indentation
...
llvm-svn: 76951
2009-07-24 05:01:55 +00:00
Chris Lattner
259a7b2a4d
simplify code by making special case more obvious
...
llvm-svn: 76950
2009-07-24 04:59:43 +00:00
Chris Lattner
e21abfb5c1
the 'isWeakForLinker' code is common between functions and globals, hoist it
...
and simplify some other code.
llvm-svn: 76949
2009-07-24 04:52:38 +00:00
Chris Lattner
4bb9a9a7d3
Replace UniqueSectionForGlobal with getSectionPrefixForUniqueGlobal.
...
The later doesn't depend on any crazy LLVM IR stuff, and this
pulls the concatenation of prefix with GV name (the root problem behind
PR4584) out one level.
llvm-svn: 76948
2009-07-24 04:49:34 +00:00
Chris Lattner
32c8463bb5
fix indentation.
...
llvm-svn: 76945
2009-07-24 04:11:40 +00:00
Chris Lattner
13611a24d8
use section flags more correctly.
...
llvm-svn: 76944
2009-07-24 04:08:17 +00:00
Chris Lattner
9aa6064164
fix a mysterious and scary failure on test/CodeGen/X86/cstring.ll
...
llvm-svn: 76942
2009-07-24 03:55:48 +00:00
Chris Lattner
6339e5e786
reduce api exposure: clients shouldn't call SectionKindForGlobal directly.
...
llvm-svn: 76941
2009-07-24 03:49:17 +00:00
Chris Lattner
2cae10056c
make Constant::getRelocationInfo return an enum, as suggested by Duncan.
...
llvm-svn: 76938
2009-07-24 03:27:21 +00:00
Chris Lattner
b7fcec2e8c
remove more bits of small section support.
...
llvm-svn: 76937
2009-07-24 03:16:53 +00:00
Chris Lattner
f4c7765d30
remove more remnants of small section support.
...
llvm-svn: 76936
2009-07-24 03:14:35 +00:00
Chris Lattner
09511ed243
Remove SectionKind::Small*. This was only used on mips, and is apparently
...
a sad mistake that is regretted. :)
llvm-svn: 76935
2009-07-24 03:11:51 +00:00
Evan Cheng
d18a7fc185
Thumb2 should use the register scavenger.
...
llvm-svn: 76930
2009-07-24 01:05:51 +00:00
Evan Cheng
d13b8f8353
FLDD, FLDS, FCPYD, FCPYS, FSTD, FSTS, VMOVD, VMOVQ maps to the same instructions on all sub-targets.
...
llvm-svn: 76925
2009-07-24 00:53:56 +00:00
Eric Christopher
c205a8da9d
Update insertps handling based on feedback. Move to a v4f32 style
...
to support vector arguments and scalar arguments correctly. Update
lowering and fix comment to refer to pinsr* instead of insertps.
llvm-svn: 76921
2009-07-24 00:33:09 +00:00
Dan Gohman
62c8b40b66
Remove the IA-64 backend.
...
llvm-svn: 76920
2009-07-24 00:30:09 +00:00
David Goodwin
85bcdffa4f
Correctly handle the Thumb-2 imm8 addrmode. Specialize frame index elimination more exactly for Thumb-2 to get better code gen.
...
llvm-svn: 76919
2009-07-24 00:16:18 +00:00
Sean Callanan
73b927334f
Added a 2+-byte NOP instruction to the Intel tables,
...
for the assembler/disassembler to use.
llvm-svn: 76914
2009-07-23 23:39:34 +00:00
Evan Cheng
90f66e1c4e
Thumb2 does not allow the use of "pc" register as part of the load / store address.
...
llvm-svn: 76909
2009-07-23 23:09:51 +00:00
Duncan Sands
f4838d90e4
Revert r75581: it causes massive breakage in the Ada
...
testsuite, due to exception handling not working
correctly. Maybe because the libgcc unwinder is
miscompiled - not sure, and I won't have time to
look into it before leaving on holiday. Note that
miscompilations of libgcc are not picked up by the
nightly testers, because they dynamically link with
libgcc, so pick up the system version rather than
the version built as part of llvm-gcc. This is a
nasty flaw in the nightly testers. (On the other
hand the Ada testsuite links with the just built
libgcc).
llvm-svn: 76895
2009-07-23 19:00:02 +00:00
Evan Cheng
f6b88eae82
Fix up ARM constant island pass for Thumb2.
...
Also fixed up code to fully use the SoImm field for ADR on ARM mode.
llvm-svn: 76890
2009-07-23 18:27:47 +00:00
Evan Cheng
8997f6bfc1
Since we have moved unified assembly, switch to ADR instruction instead of a the difficult-to-read .set + add syntax to materialize pc-relative address.
...
Turns out this also fixed a poor code selection on Thumb1. I have no idea why we were using a mov + add to do the same thing as ADR before.
llvm-svn: 76889
2009-07-23 18:26:03 +00:00
David Goodwin
f3c839e0b9
Fix frame index elimination to correctly handle thumb-2 addressing modes that don't allow negative offsets. During frame elimination convert *i12 opcode to a *i8 when necessary due to a negative offset.
...
llvm-svn: 76883
2009-07-23 17:06:46 +00:00
Evan Cheng
c21e149091
80 col violation.
...
llvm-svn: 76872
2009-07-23 07:58:08 +00:00
Eric Christopher
c9299d5756
Support insertps via the intrinsic and add a couple of simple
...
testcases to make sure it's being generated.
llvm-svn: 76843
2009-07-23 02:22:41 +00:00
Sanjiv Gupta
d62bebab22
Do not call getMangledName on Intrinsics.
...
llvm-svn: 76842
2009-07-23 02:11:04 +00:00
Chris Lattner
a3b58f4ecd
remove SectionFlags::Small: it is only used on Xcore, and we'll find
...
a better solution for it in the future.
llvm-svn: 76818
2009-07-22 23:27:22 +00:00
Dan Gohman
840e7f252e
x86 isel tweak: use lea (%reg,%reg) instead of lea (,%reg,2).
...
llvm-svn: 76817
2009-07-22 23:26:55 +00:00
David Goodwin
6fa63db9be
Fix typo in addrmode definition.
...
llvm-svn: 76806
2009-07-22 22:24:31 +00:00
Evan Cheng
4a77f28c47
Use getTargetConstant instead of getConstant since it's meant as an constant operand.
...
llvm-svn: 76803
2009-07-22 22:03:29 +00:00
Daniel Dunbar
3119e6a609
Switch some clients to Value::getName(), and other getName() user
...
simplification.
- NFC
llvm-svn: 76789
2009-07-22 21:33:09 +00:00
Daniel Dunbar
0ff394b13d
Simplify some uses of Value::getName()
...
llvm-svn: 76786
2009-07-22 21:10:12 +00:00
Daniel Dunbar
b6a40026a7
Fix indentation.
...
llvm-svn: 76778
2009-07-22 20:26:37 +00:00
Evan Cheng
ae91b0616b
Eliminate a redudant check Eli pointed out.
...
llvm-svn: 76762
2009-07-22 18:08:05 +00:00