Chris Lattner [Sun, 26 Jul 2009 06:36:20 +0000 (06:36 +0000)]
two files I missed in the last commit.
llvm-svn: 77137
Chris Lattner [Sun, 26 Jul 2009 06:34:33 +0000 (06:34 +0000)]
remove a bunch of helper functions, just use SectionKind::get instead.
llvm-svn: 77135
Chris Lattner [Sun, 26 Jul 2009 06:26:55 +0000 (06:26 +0000)]
simplify getSectionForMergableConstant to take a SectionKind.
llvm-svn: 77134
Chris Lattner [Sun, 26 Jul 2009 06:16:11 +0000 (06:16 +0000)]
precreate 4/8/16 byte mergable sections to simplify code.
llvm-svn: 77133
Chris Lattner [Sun, 26 Jul 2009 06:11:33 +0000 (06:11 +0000)]
introduce specialized mergable const sectionkinds for elements of size 4/8/16 to
simplify targets.
llvm-svn: 77132
Chris Lattner [Sun, 26 Jul 2009 05:57:07 +0000 (05:57 +0000)]
improve the default impl of getSectionForMergableConstant by
putting readonly constants in the readonly section if we have one.
llvm-svn: 77131
Chris Lattner [Sun, 26 Jul 2009 05:55:20 +0000 (05:55 +0000)]
make elf targets correctly handle constant pool entries that require relocations.
llvm-svn: 77130
Chris Lattner [Sun, 26 Jul 2009 05:44:20 +0000 (05:44 +0000)]
Rearrange all the SectionKinds and structure them into a hierarchical
group instead of a bunch of random unrelated ideas. Provide predicates
to categorize a SectionKind into a group, and use them instead of
getKind() throughout the code.
This also renames a ton of SectionKinds to be more consistent and
evocative, and adds a huge number of comments on the enums so that
I will hopefully be able to remember how this stuff works long from
now.
llvm-svn: 77129
Daniel Dunbar [Sun, 26 Jul 2009 05:41:39 +0000 (05:41 +0000)]
Update target registration description in Writing An LLVM Backend, and add
a mention in release notes.
llvm-svn: 77128
Daniel Dunbar [Sun, 26 Jul 2009 05:09:50 +0000 (05:09 +0000)]
Sort list of targets in --version.
llvm-svn: 77127
Daniel Dunbar [Sun, 26 Jul 2009 05:03:33 +0000 (05:03 +0000)]
Factor commonality in triple match routines into helper template for registering
classes, and migrate existing targets over.
llvm-svn: 77126
Daniel Dunbar [Sun, 26 Jul 2009 04:52:45 +0000 (04:52 +0000)]
Oops, forgot XCore. Sorry XCore!
llvm-svn: 77125
Daniel Dunbar [Sun, 26 Jul 2009 04:23:03 +0000 (04:23 +0000)]
Update for API change.
llvm-svn: 77124
Chris Lattner [Sun, 26 Jul 2009 04:18:10 +0000 (04:18 +0000)]
fix isReadOnly predicate to not include data that has to be
writable because of teh dynamic linker.
llvm-svn: 77122
Chris Lattner [Sun, 26 Jul 2009 04:09:02 +0000 (04:09 +0000)]
remove a dead enum case.
llvm-svn: 77121
Daniel Dunbar [Sun, 26 Jul 2009 03:31:47 +0000 (03:31 +0000)]
Update Triple to use StringRef/Twine based APIs.
- This is now shorter, simpler, safer, and more efficient, what a deal.
llvm-svn: 77119
Daniel Dunbar [Sun, 26 Jul 2009 03:18:15 +0000 (03:18 +0000)]
Add StringRef::{slice, split}, two convenient string operations which are simple
and efficient on a StringRef.
llvm-svn: 77117
Chris Lattner [Sun, 26 Jul 2009 03:06:11 +0000 (03:06 +0000)]
put normal data into .data instead of .data.rel on elf systems.
llvm-svn: 77116
Daniel Dunbar [Sun, 26 Jul 2009 02:23:52 +0000 (02:23 +0000)]
Remove unused header
llvm-svn: 77115
Daniel Dunbar [Sun, 26 Jul 2009 02:22:58 +0000 (02:22 +0000)]
Kill Target specific ModuleMatchQuality stuff.
- This was overkill and inconsistently implemented.
llvm-svn: 77114
Daniel Dunbar [Sun, 26 Jul 2009 02:21:04 +0000 (02:21 +0000)]
Update for API change.
llvm-svn: 77112
Daniel Dunbar [Sun, 26 Jul 2009 02:12:58 +0000 (02:12 +0000)]
Add TargetRegistry::lookupTarget.
- This is a simplified mechanism which just looks up a target based on the
target triple, with a few additional flags.
- Remove getClosestStaticTargetForModule, the moral equivalent is now:
lookupTarget(Mod->getTargetTriple, true, false, ...);
- This no longer does the fuzzy matching with target data (based on endianness
and pointer width) that getClosestStaticTargetForModule was doing, but this
was deemed unnecessary.
llvm-svn: 77111
Chris Lattner [Sun, 26 Jul 2009 01:44:55 +0000 (01:44 +0000)]
eliminate a pointless switch stmt.
llvm-svn: 77110
Daniel Dunbar [Sun, 26 Jul 2009 01:27:26 +0000 (01:27 +0000)]
Lookup targets by Triple instead of Module.
llvm-svn: 77108
Chris Lattner [Sun, 26 Jul 2009 01:24:18 +0000 (01:24 +0000)]
finish simplifying DarwinTargetAsmInfo::SelectSectionForGlobal
for now. Make the section switching directives more consistent
by not including \n and including \t for them all.
llvm-svn: 77107
Daniel Dunbar [Sun, 26 Jul 2009 01:04:10 +0000 (01:04 +0000)]
Some clients rely on getName{Start,End} not returning 0, even if the length is
0.
- I could have swore the prev change went through a make check cycle...
llvm-svn: 77106
Daniel Dunbar [Sun, 26 Jul 2009 00:51:56 +0000 (00:51 +0000)]
Rewrite getName{Start,End,Len} in terms of getName(), instead of vice-versa.
llvm-svn: 77105
Chris Lattner [Sun, 26 Jul 2009 00:51:36 +0000 (00:51 +0000)]
simplify DarwinTargetAsmInfo::SelectSectionForGlobal a bit
and make it more aggressive, we now put:
const int G2 __attribute__((weak)) = 42;
into the text (readonly) segment like gcc, previously we put
it into the data (readwrite) segment.
llvm-svn: 77104
Chris Lattner [Sun, 26 Jul 2009 00:50:43 +0000 (00:50 +0000)]
simplify some predicates, add isMergableString()
llvm-svn: 77103
Daniel Dunbar [Sun, 26 Jul 2009 00:42:33 +0000 (00:42 +0000)]
Simplify.
llvm-svn: 77102
Bob Wilson [Sun, 26 Jul 2009 00:39:34 +0000 (00:39 +0000)]
Add support for ARM Neon VREV instructions.
Patch by Anton Korzh, with some modifications from me.
llvm-svn: 77101
Daniel Dunbar [Sun, 26 Jul 2009 00:34:27 +0000 (00:34 +0000)]
Remove Value::setName(const char*, unsigned).
llvm-svn: 77100
Daniel Dunbar [Sun, 26 Jul 2009 00:17:14 +0000 (00:17 +0000)]
Remove Value::setName(const char*).
- Split into a separate patch because there is a slight functionality change,
it is no longer valid to call setName(0), which was equivalent to
setName(""). I'm hoping no one depends on this...
llvm-svn: 77099
Daniel Dunbar [Sat, 25 Jul 2009 23:55:21 +0000 (23:55 +0000)]
Remove Value::{isName, getNameRef}.
Also, change MDString to use a StringRef.
llvm-svn: 77098
Mike Stump [Sat, 25 Jul 2009 23:24:03 +0000 (23:24 +0000)]
Preserve qualifiers.
llvm-svn: 77097
Chris Lattner [Sat, 25 Jul 2009 23:21:55 +0000 (23:21 +0000)]
make SectionKind be a first-class pod struct instead of just
an enum.
llvm-svn: 77096
Ryan Flynn [Sat, 25 Jul 2009 22:29:44 +0000 (22:29 +0000)]
PR3575 - warn on declared variable or function attributes after a definition, which are currently ignored.
llvm-svn: 77095
Argyrios Kyrtzidis [Sat, 25 Jul 2009 22:16:03 +0000 (22:16 +0000)]
Refactor ObjCImplDecl::getInstanceMethod/getClassMethod into one
ObjCImplDecl::getMethod.
llvm-svn: 77094
Argyrios Kyrtzidis [Sat, 25 Jul 2009 22:15:51 +0000 (22:15 +0000)]
Refactor ObjCInterfaceDecl::lookupInstanceMethod/lookupClassMethod into one
ObjCInterfaceDecl::lookupMethod.
llvm-svn: 77093
Argyrios Kyrtzidis [Sat, 25 Jul 2009 22:15:38 +0000 (22:15 +0000)]
Refactor ObjCProtocolDecl::lookupInstanceMethod/lookupClassMethod into one
ObjCProtocolDecl::lookupMethod.
llvm-svn: 77092
Argyrios Kyrtzidis [Sat, 25 Jul 2009 22:15:22 +0000 (22:15 +0000)]
Refactor ObjCContainerDecl::getInstanceMethod/getClassMethod into one
ObjCContainerDecl::getMethod.
Avoids code duplication.
llvm-svn: 77091
Mike Stump [Sat, 25 Jul 2009 22:12:02 +0000 (22:12 +0000)]
Improve comments (Thanks Fariborz).
llvm-svn: 77090
Mike Stump [Sat, 25 Jul 2009 21:26:53 +0000 (21:26 +0000)]
Add noreturn as a type attribute, handle printing for them and handle
calls to noreturn function pointers when CFG building.
llvm-svn: 77089
Reid Kleckner [Sat, 25 Jul 2009 21:26:02 +0000 (21:26 +0000)]
Added a test and fixed a bug in BumpPtrAllocator relating to large alignment
values. Hopefully this fixes PR4622.
llvm-svn: 77088
Fariborz Jahanian [Sat, 25 Jul 2009 21:12:28 +0000 (21:12 +0000)]
ir-gen for non-virtual base class initialization
in constructors.
llvm-svn: 77087
Chris Lattner [Sat, 25 Jul 2009 18:57:34 +0000 (18:57 +0000)]
this is (unfortunately) several changes mixed together:
1. Spell SectionFlags::Writeable as "Writable".
2. Add predicates for deriving SectionFlags from SectionKinds.
3. Sink ELF-specific getSectionPrefixForUniqueGlobal impl into
ELFTargetAsmInfo.
4. Fix SectionFlagsForGlobal to know that BSS/ThreadBSS has the
BSS bit set (the real fix for PR4619).
5. Fix isSuitableForBSS to not put globals with explicit sections
set in BSS (which was the reason #4 wasn't fixed earlier).
6. Remove my previous hack for PR4619.
llvm-svn: 77085
Chris Lattner [Sat, 25 Jul 2009 18:11:58 +0000 (18:11 +0000)]
document some invariants.
llvm-svn: 77084
Chris Lattner [Sat, 25 Jul 2009 17:57:37 +0000 (17:57 +0000)]
add the most expedient hack to fix PR4619, along with a testcase.
Thanks to Rafael for the great example.
llvm-svn: 77083
Dan Gohman [Sat, 25 Jul 2009 16:18:38 +0000 (16:18 +0000)]
Fix a few comments to say "backedge-taken count" instead of
"trip count".
llvm-svn: 77081
Dan Gohman [Sat, 25 Jul 2009 16:18:07 +0000 (16:18 +0000)]
SCEV objects are no longer reference-counted.
llvm-svn: 77080
Dan Gohman [Sat, 25 Jul 2009 16:03:55 +0000 (16:03 +0000)]
Update comments to new-style syntax.
llvm-svn: 77079
Dan Gohman [Sat, 25 Jul 2009 16:03:30 +0000 (16:03 +0000)]
When attempting to sign-extend an addrec by interpreting
the step value as unsigned, the start value and the addrec
itself still need to be treated as signed.
llvm-svn: 77078
Dan Gohman [Sat, 25 Jul 2009 16:00:54 +0000 (16:00 +0000)]
Remove spurious semicolons.
llvm-svn: 77077
Sebastian Redl [Sat, 25 Jul 2009 15:41:38 +0000 (15:41 +0000)]
Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conversions, like vectors, but allows conversions via constructors and conversion operators.
Add custom conversions to static_cast.
llvm-svn: 77076
Daniel Dunbar [Sat, 25 Jul 2009 15:26:08 +0000 (15:26 +0000)]
MultiTestRunner: Make sure to point at src dir, for out of tree builds.
Factor out routine for executing the script commands.
llvm-svn: 77075
Daniel Dunbar [Sat, 25 Jul 2009 14:46:05 +0000 (14:46 +0000)]
MultiTestRunner: Cleanup test execution & output.
- Stop writing everything to files.
- Make test output more standard.
llvm-svn: 77074
Daniel Dunbar [Sat, 25 Jul 2009 13:19:40 +0000 (13:19 +0000)]
MultiTestRunner: Drop external script and DejaGNU compatibility options for now.
- We don't use the former, and the latter doesn't actually work.
llvm-svn: 77073
Daniel Dunbar [Sat, 25 Jul 2009 13:13:06 +0000 (13:13 +0000)]
MultiTestRunner: Disable valgrind support for now, I don't feel like maintaining
it currently.
llvm-svn: 77072
Daniel Dunbar [Sat, 25 Jul 2009 12:57:15 +0000 (12:57 +0000)]
MultiTestRunner/Win32: Add SYSTEMROOT to environment, replace '&&' in .bat
files.
llvm-svn: 77071
Daniel Dunbar [Sat, 25 Jul 2009 12:47:38 +0000 (12:47 +0000)]
Make having no RUN line a failure.
Doug, please look at decltype-crash and instantiate-function-1.mm, I'm not sure
if they are actually testing the right thing / anything.
llvm-svn: 77070
Daniel Dunbar [Sat, 25 Jul 2009 12:44:58 +0000 (12:44 +0000)]
Remove TESTDIR initialization, MultiTestRunner can find the test dirs itself.
llvm-svn: 77069
Daniel Dunbar [Sat, 25 Jul 2009 12:41:25 +0000 (12:41 +0000)]
Remove empty tests, left over from an svn revert.
llvm-svn: 77068
Daniel Dunbar [Sat, 25 Jul 2009 12:37:21 +0000 (12:37 +0000)]
Remove this Makefile, it is unused.
llvm-svn: 77067
Daniel Dunbar [Sat, 25 Jul 2009 12:23:35 +0000 (12:23 +0000)]
MultiTestRunner: Oops, clang wasn't being substituted properly. This is why the
cxx-using-declaration test case started exhibiting different behavior. It still
needs to be fixed, however...
llvm-svn: 77066
Andreas Bolka [Sat, 25 Jul 2009 12:19:58 +0000 (12:19 +0000)]
Convert DOUT to DEBUG.
llvm-svn: 77065
Daniel Dunbar [Sat, 25 Jul 2009 12:05:55 +0000 (12:05 +0000)]
MultiTestRunner: Always use absolute path names for tests.
Also, fix a function name I forgot to update.
llvm-svn: 77064
Daniel Dunbar [Sat, 25 Jul 2009 11:55:03 +0000 (11:55 +0000)]
Disable this test: cxx-using-declaration.cpp
Something strange is going on here; this test randomly started failing after
unrelated changes to TestRunner.py (even though it runs the same
script).
Argiris or Doug, can one of you investigate?
llvm-svn: 77063
Daniel Dunbar [Sat, 25 Jul 2009 11:27:37 +0000 (11:27 +0000)]
MultiTestRunner: Validate '&&' at the end of RUN lines.
- This is just to normalize, these will go away soon hopefully.
Added all the missing '&&'s that have crept in. :)
llvm-svn: 77062
Daniel Dunbar [Sat, 25 Jul 2009 10:14:19 +0000 (10:14 +0000)]
MultiTestRunner: Explicitly define child environment, the only variable we need
to import is the PATH.
llvm-svn: 77061
Daniel Dunbar [Sat, 25 Jul 2009 10:09:50 +0000 (10:09 +0000)]
Simplify JIT target selection.
- Instead of requiring targets to define a JIT quality match function, we just
have them specify if they support a JIT.
- Target selection for the JIT just gets the host triple and looks for the best
target which matches the triple and has a JIT.
llvm-svn: 77060
Daniel Dunbar [Sat, 25 Jul 2009 09:53:43 +0000 (09:53 +0000)]
MultiTestRunner.py improvements.
- Tweak output directories for temp files, derive the temporary base from the
test's parent directory name, and the test name (instead of the whole path).
llvm-svn: 77059
Daniel Dunbar [Sat, 25 Jul 2009 09:42:24 +0000 (09:42 +0000)]
MultiTestRunner.py improvements.
- Not improved: the horribly lousy name. :)
- Suppress stderr when capturing output.
- Rewrite which() to do the right PATH search instead of being lazy and
shelling out to 'which'.
- On Windows, run scripts as batch files (via 'cmd /c ...').
llvm-svn: 77058
Daniel Dunbar [Sat, 25 Jul 2009 09:01:12 +0000 (09:01 +0000)]
Change these tests to not depend as much on the name of the input.
llvm-svn: 77057
Sanjiv Gupta [Sat, 25 Jul 2009 07:48:53 +0000 (07:48 +0000)]
Mark attributes of return insn correctly. It was being assumed safe to delete in isSafeToDelete (a thing checked-in 76281).
llvm-svn: 77056
Chris Lattner [Sat, 25 Jul 2009 07:31:51 +0000 (07:31 +0000)]
remove this test. It is currently failing because we now emit the string
on darwin with ".cstring" instead of ".section __TEXT,__cstring". They
are the same and the former is better. Remove this because this is no longer
magic pixie dust in the frontend.
llvm-svn: 77055
Chris Lattner [Sat, 25 Jul 2009 07:22:20 +0000 (07:22 +0000)]
eventually we should describe string options in the data structures section
llvm-svn: 77054
Chris Lattner [Sat, 25 Jul 2009 07:16:59 +0000 (07:16 +0000)]
minor tweaks.
llvm-svn: 77053
Daniel Dunbar [Sat, 25 Jul 2009 06:49:55 +0000 (06:49 +0000)]
Add new helpers for registering targets.
- Less boilerplate == good.
llvm-svn: 77052
Daniel Dunbar [Sat, 25 Jul 2009 06:02:13 +0000 (06:02 +0000)]
Finish migrating VMCore to StringRef/Twine based APIs.
llvm-svn: 77051
Daniel Dunbar [Sat, 25 Jul 2009 05:26:53 +0000 (05:26 +0000)]
Ok, "most clients should be unaffected" was a lie. Add notes on upgrading.
llvm-svn: 77050
Daniel Dunbar [Sat, 25 Jul 2009 04:41:11 +0000 (04:41 +0000)]
Initial update to VMCore to use Twines for string arguments.
- The only meat here is in Value.{h,cpp} the rest is essential 'const
std::string &' -> 'const Twine &'.
llvm-svn: 77048
John McCall [Sat, 25 Jul 2009 04:36:53 +0000 (04:36 +0000)]
Semantic checking for main().
Fix some invalid main() methods in the test suite that were nicely
exposed by the new checks.
llvm-svn: 77047
John McCall [Sat, 25 Jul 2009 04:35:50 +0000 (04:35 +0000)]
Flesh out the QualifierSet API.
llvm-svn: 77046
Eric Christopher [Sat, 25 Jul 2009 02:45:27 +0000 (02:45 +0000)]
Fix 80-col violations.
llvm-svn: 77045
Eric Christopher [Sat, 25 Jul 2009 02:28:41 +0000 (02:28 +0000)]
Move ExtractElementInst to ::Create instead of new. Update all uses.
llvm-svn: 77044
Dan Gohman [Sat, 25 Jul 2009 02:23:48 +0000 (02:23 +0000)]
Update to new syntax.
llvm-svn: 77043
Daniel Dunbar [Sat, 25 Jul 2009 01:55:32 +0000 (01:55 +0000)]
Rewrite examples to use DEBUG instead of DOUT.
llvm-svn: 77042
Evan Cheng [Sat, 25 Jul 2009 01:55:25 +0000 (01:55 +0000)]
80 col violation.
llvm-svn: 77041
Daniel Dunbar [Sat, 25 Jul 2009 01:43:39 +0000 (01:43 +0000)]
Tweak svn:ignore
llvm-svn: 77040
Dan Gohman [Sat, 25 Jul 2009 01:43:01 +0000 (01:43 +0000)]
Convert a few more things to use raw_ostream.
llvm-svn: 77039
Anders Carlsson [Sat, 25 Jul 2009 01:40:29 +0000 (01:40 +0000)]
More work on the constant struct builder. We can now convert the struct to a packed struct when necessary.
llvm-svn: 77038
Evan Cheng [Sat, 25 Jul 2009 01:25:08 +0000 (01:25 +0000)]
Get rid of a couple of unnecessary getOpcode calls.
llvm-svn: 77035
Dan Gohman [Sat, 25 Jul 2009 01:22:26 +0000 (01:22 +0000)]
Teach ScalarEvolution to make use of no-overflow flags when
analyzing add recurrences.
llvm-svn: 77034
Dan Gohman [Sat, 25 Jul 2009 01:13:51 +0000 (01:13 +0000)]
Convert a few more uses of llvm/Support/Streams.h to raw_ostream.
llvm-svn: 77033
Dan Gohman [Sat, 25 Jul 2009 01:13:03 +0000 (01:13 +0000)]
Instead of eagerly creating new SCEVs to replace all SCEVs that are
affected after a PHI node has been analyzed, just remove affected
SCEVs from the Scalars map, so that they'll be (lazily) recreated as
needed. This avoids creating SCEV objects that aren't actually needed.
Also, rewrite the associated def-use walking code to be non-recursive
and to continue traversing past Instructions that don't have an
entry in the Scalars map.
llvm-svn: 77032
Evan Cheng [Sat, 25 Jul 2009 01:11:46 +0000 (01:11 +0000)]
I've lost my mind. PR4572 has not been fixed.
llvm-svn: 77031
Fariborz Jahanian [Sat, 25 Jul 2009 01:08:28 +0000 (01:08 +0000)]
Some code refactoring per Daniel's feedback.
llvm-svn: 77030
Dan Gohman [Sat, 25 Jul 2009 00:48:42 +0000 (00:48 +0000)]
Make AliasAnalysis and related classes use
getAnalysisIfAvailable<TargetData>().
llvm-svn: 77028
Daniel Dunbar [Sat, 25 Jul 2009 00:43:31 +0000 (00:43 +0000)]
One more getName -> getNameStr
llvm-svn: 77027
Evan Cheng [Sat, 25 Jul 2009 00:39:37 +0000 (00:39 +0000)]
Another TODO.
llvm-svn: 77026