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
Jeffrey Yasskin [Sat, 25 Jul 2009 00:33:57 +0000 (00:33 +0000)]
Add a missing ilist_node.h #include to SparseBitVector, and add a very short
test for it. The test is by no means complete, but it tests the problem I was
fixing.
llvm-svn: 77025
Evan Cheng [Sat, 25 Jul 2009 00:33:29 +0000 (00:33 +0000)]
Change Thumb2 jumptable codegen to one that uses two level jumps:
Before:
adr r12, #LJTI3_0_0
ldr pc, [r12, +r0, lsl #2]
LJTI3_0_0:
.long LBB3_24
.long LBB3_30
.long LBB3_31
.long LBB3_32
After:
adr r12, #LJTI3_0_0
add pc, r12, +r0, lsl #2
LJTI3_0_0:
b.w LBB3_24
b.w LBB3_30
b.w LBB3_31
b.w LBB3_32
This has several advantages.
1. This will make it easier to optimize this to a TBB / TBH instruction +
(smaller) table.
2. This eliminate the need for ugly asm printer hack to force the address
into thumb addresses (bit 0 is one).
3. Same codegen for pic and non-pic.
4. This eliminate the need to align the table so constantpool island pass
won't have to over-estimate the size.
Based on my calculation, the later is probably slightly faster as well since
ldr pc with shifter address is very slow. That is, it should be a win as long
as the HW implementation can do a reasonable job of branch predict the second
branch.
llvm-svn: 77024
Sean Callanan [Sat, 25 Jul 2009 00:30:51 +0000 (00:30 +0000)]
MemoryObject - Abstract base class for contiguous addressable memory.
Necessary for cases in which the memory is in another process, in a
file, or on a remote machine.
The primary use for this is the llvm-mc disassemblers, so that they
can be targeted at arbitrary objects, not just in-process memory.
llvm-svn: 77023
Anders Carlsson [Sat, 25 Jul 2009 00:26:00 +0000 (00:26 +0000)]
Whoops, did not mean to check this in.
llvm-svn: 77022
Anders Carlsson [Sat, 25 Jul 2009 00:24:56 +0000 (00:24 +0000)]
More work on the constant struct builder. We now try to layout all constant structs but throw away the result.
llvm-svn: 77021
Evan Cheng [Sat, 25 Jul 2009 00:24:40 +0000 (00:24 +0000)]
Remove a duplicated test.
llvm-svn: 77020
Daniel Dunbar [Sat, 25 Jul 2009 00:23:56 +0000 (00:23 +0000)]
More migration to raw_ostream, the water has dried up around the iostream hole.
- Some clients which used DOUT have moved to DEBUG. We are deprecating the
"magic" DOUT behavior which avoided calling printing functions when the
statement was disabled. In addition to being unnecessary magic, it had the
downside of leaving code in -Asserts builds, and of hiding potentially
unnecessary computations.
llvm-svn: 77019
Evan Cheng [Sat, 25 Jul 2009 00:13:11 +0000 (00:13 +0000)]
ARM code emitter can't handle Thumb2 instructions yet. So don't even try.
llvm-svn: 77018
Daniel Dunbar [Fri, 24 Jul 2009 23:54:34 +0000 (23:54 +0000)]
Tweak, raw_ostream is a ostream, not iostream replacement
llvm-svn: 77017
Daniel Dunbar [Fri, 24 Jul 2009 23:42:33 +0000 (23:42 +0000)]
Fix build for GCC 4.0?
llvm-svn: 77016
Daniel Dunbar [Fri, 24 Jul 2009 23:23:46 +0000 (23:23 +0000)]
Fix compile with 4.4 (I hope?); PR4617.
llvm-svn: 77015
Andreas Bolka [Fri, 24 Jul 2009 23:19:28 +0000 (23:19 +0000)]
Forward-declare raw_ostream.
llvm-svn: 77014
Owen Anderson [Fri, 24 Jul 2009 23:12:58 +0000 (23:12 +0000)]
Update for LLVM API change.
llvm-svn: 77012
Owen Anderson [Fri, 24 Jul 2009 23:12:02 +0000 (23:12 +0000)]
Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
llvm-svn: 77011
Daniel Dunbar [Fri, 24 Jul 2009 23:04:51 +0000 (23:04 +0000)]
CodingStandards: Emphasize use of raw_ostream more.
- Chris, please approve.
llvm-svn: 77010
Dan Gohman [Fri, 24 Jul 2009 23:01:30 +0000 (23:01 +0000)]
AliasAnalysis wants sizes in address-units, not bits.
llvm-svn: 77009
Evan Cheng [Fri, 24 Jul 2009 22:42:45 +0000 (22:42 +0000)]
Forgot this test earlier.
llvm-svn: 77007
Evan Cheng [Fri, 24 Jul 2009 22:42:22 +0000 (22:42 +0000)]
Fix these tests.
llvm-svn: 77006
Eli Friedman [Fri, 24 Jul 2009 21:56:17 +0000 (21:56 +0000)]
Fix assert assembling zero-argument constant GEP.
There's still a strict-aliasing violation here, but I don't feel like
dealing with that right now...
llvm-svn: 77005
Evan Cheng [Fri, 24 Jul 2009 20:47:38 +0000 (20:47 +0000)]
Uh. It would be useful to actually print the operand.
llvm-svn: 77004
Douglas Gregor [Fri, 24 Jul 2009 20:34:43 +0000 (20:34 +0000)]
Template instantiation for static data members that are defined out-of-line.
Note that this also fixes a bug that affects non-template code, where we
were not treating out-of-line static data members are "file-scope" variables,
and therefore not checking their initializers.
llvm-svn: 77002
Fariborz Jahanian [Fri, 24 Jul 2009 20:33:35 +0000 (20:33 +0000)]
Fixes broken test by accident.
llvm-svn: 77001
Fariborz Jahanian [Fri, 24 Jul 2009 20:28:49 +0000 (20:28 +0000)]
More Sema check for constructor's member initializer along
with type conversion to fix ir-gen crash.
llvm-svn: 77000
Chris Lattner [Fri, 24 Jul 2009 20:27:11 +0000 (20:27 +0000)]
fix some predicates
llvm-svn: 76999
Ted Kremenek [Fri, 24 Jul 2009 20:26:31 +0000 (20:26 +0000)]
In the "use of floating point variable as loop counter" check, check
if the DeclRefExpr is a float, not just either argument.
llvm-svn: 76998
Chris Lattner [Fri, 24 Jul 2009 20:14:10 +0000 (20:14 +0000)]
change SectionKindForGlobal from being a public (and
previously virtual) function to being a static function
in the .cpp file.
llvm-svn: 76997
Ted Kremenek [Fri, 24 Jul 2009 20:03:11 +0000 (20:03 +0000)]
Have 'clang --analyze' run syntactic static analysis security checks.
llvm-svn: 76996
Evan Cheng [Fri, 24 Jul 2009 19:31:03 +0000 (19:31 +0000)]
Disable my constant island pass optimization (to make use soimm more effectively). It caused infinite looping on lencod.
llvm-svn: 76995
Eric Christopher [Fri, 24 Jul 2009 19:24:26 +0000 (19:24 +0000)]
Move insertps tests to sse41 combo test file, convert to filecheck
format and add an extract/insert test.
llvm-svn: 76994
Chris Lattner [Fri, 24 Jul 2009 19:15:47 +0000 (19:15 +0000)]
make SectionKindForGlobal target independent, and therefore non-virtual.
It's classifications now include elf-specific discriminators. Targets
that don't have these features (like darwin and pecoff) simply treat
data.rel like data, etc.
llvm-svn: 76993
Mike Stump [Fri, 24 Jul 2009 19:02:52 +0000 (19:02 +0000)]
Fix 80-col violations, reflow a few comments and zap some extra
whitespace at ends of lines.
llvm-svn: 76992
Evan Cheng [Fri, 24 Jul 2009 18:54:23 +0000 (18:54 +0000)]
Add a workaround for Darwin assembler bug where it's not setting the thumb bit in Thumb2 jumptable entries. We now pass Olden.
llvm-svn: 76991
Chris Lattner [Fri, 24 Jul 2009 18:42:53 +0000 (18:42 +0000)]
we already know the sectionkind when invoking SelectSectionForGlobal,
pass it in instead of recomputing it.
llvm-svn: 76990
Chris Lattner [Fri, 24 Jul 2009 18:34:27 +0000 (18:34 +0000)]
make SectionForGlobal non-virtual, add a hook for pic16 to do its "address=" hack.
llvm-svn: 76989
Dan Gohman [Fri, 24 Jul 2009 18:31:07 +0000 (18:31 +0000)]
Fix this condition I accidentally inverted.
llvm-svn: 76988
Jakob Stoklund Olesen [Fri, 24 Jul 2009 18:22:59 +0000 (18:22 +0000)]
Add support for promoting SETCC operations.
llvm-svn: 76987
Evan Cheng [Fri, 24 Jul 2009 18:20:44 +0000 (18:20 +0000)]
Make sure thumb2 jumptable entries are aligned.
llvm-svn: 76986
Anders Carlsson [Fri, 24 Jul 2009 18:20:38 +0000 (18:20 +0000)]
Fix a release build warning.
llvm-svn: 76985
Evan Cheng [Fri, 24 Jul 2009 18:20:16 +0000 (18:20 +0000)]
Clean up.
llvm-svn: 76984
Evan Cheng [Fri, 24 Jul 2009 18:19:46 +0000 (18:19 +0000)]
Replace use of std::set with SmallPtrSet.
llvm-svn: 76983
Dan Gohman [Fri, 24 Jul 2009 18:13:53 +0000 (18:13 +0000)]
Convert several more passes to use getAnalysisIfAvailable<TargetData>()
instead of getAnalysis<TargetData>().
llvm-svn: 76982
Dan Gohman [Fri, 24 Jul 2009 18:12:25 +0000 (18:12 +0000)]
Add specific classes for Add, Sub, and Mul, for convenience.
llvm-svn: 76981
Fariborz Jahanian [Fri, 24 Jul 2009 17:57:02 +0000 (17:57 +0000)]
More work toward initialization of objects
in constructors.
llvm-svn: 76980
Steve Naroff [Fri, 24 Jul 2009 17:54:45 +0000 (17:54 +0000)]
Allow front-end 'isa' access on object's of type 'id'.
Enhance test case to cover 'isa' access on interface types (clang produces an error, GCC produces a warning).
Still need back-end CodeGen for ObjCIsaExpr.
llvm-svn: 76979
Anders Carlsson [Fri, 24 Jul 2009 17:23:54 +0000 (17:23 +0000)]
Don't use getLLVMFieldNo for bitfields when constructing the ivar layout maps for GC.
llvm-svn: 76978
Chris Lattner [Fri, 24 Jul 2009 17:13:27 +0000 (17:13 +0000)]
start refactoring pic16 section selection logic.
llvm-svn: 76977
Chris Lattner [Fri, 24 Jul 2009 17:02:17 +0000 (17:02 +0000)]
move ELF-specific code into ELFTargetAsmInfo.
llvm-svn: 76976
Chris Lattner [Fri, 24 Jul 2009 16:53:52 +0000 (16:53 +0000)]
tidy up
llvm-svn: 76975
Chris Lattner [Fri, 24 Jul 2009 16:50:24 +0000 (16:50 +0000)]
split the ELF-specific section flag inference-from-name code out
into its own helper function.
llvm-svn: 76974
Chris Lattner [Fri, 24 Jul 2009 16:46:50 +0000 (16:46 +0000)]
make SectionFlagsForGlobal a private static function instead of a public
virtual one.
llvm-svn: 76973
Chris Lattner [Fri, 24 Jul 2009 16:44:01 +0000 (16:44 +0000)]
move a method up in the file, GV is always non-null, so remove a check.
llvm-svn: 76972
Chris Lattner [Fri, 24 Jul 2009 16:40:45 +0000 (16:40 +0000)]
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
Chris Lattner [Fri, 24 Jul 2009 16:40:09 +0000 (16:40 +0000)]
remove a use of SectionFlagsForGlobal.
llvm-svn: 76970
Anders Carlsson [Fri, 24 Jul 2009 15:20:52 +0000 (15:20 +0000)]
Check in a half finished new constant struct builder (Obviously not used yet).
llvm-svn: 76969
Daniel Dunbar [Fri, 24 Jul 2009 12:21:08 +0000 (12:21 +0000)]
Another getName -> getNameStr
llvm-svn: 76967
Daniel Dunbar [Fri, 24 Jul 2009 10:47:20 +0000 (10:47 +0000)]
More move to raw_ostream.
llvm-svn: 76966
Daniel Dunbar [Fri, 24 Jul 2009 10:36:58 +0000 (10:36 +0000)]
Move more to raw_ostream, provide support for writing MachineBasicBlock,
LiveInterval, etc to raw_ostream.
llvm-svn: 76965
Daniel Dunbar [Fri, 24 Jul 2009 10:05:20 +0000 (10:05 +0000)]
Move more to raw_ostream.
llvm-svn: 76964
Daniel Dunbar [Fri, 24 Jul 2009 09:53:24 +0000 (09:53 +0000)]
Move to raw_ostream.
llvm-svn: 76963
Daniel Dunbar [Fri, 24 Jul 2009 08:24:36 +0000 (08:24 +0000)]
Switch to getNameStr().
llvm-svn: 76962
Daniel Dunbar [Fri, 24 Jul 2009 07:58:10 +0000 (07:58 +0000)]
Allow llvm_report_error to accept a Twine.
llvm-svn: 76961
Eli Friedman [Fri, 24 Jul 2009 07:43:59 +0000 (07:43 +0000)]
Remove unused member functions.
llvm-svn: 76960
Daniel Dunbar [Fri, 24 Jul 2009 07:40:24 +0000 (07:40 +0000)]
Fix declaration of obc_enumerationMutation function, for GNU runtime.
llvm-svn: 76959
Daniel Dunbar [Fri, 24 Jul 2009 07:12:20 +0000 (07:12 +0000)]
Fix constructor types
llvm-svn: 76958
Daniel Dunbar [Fri, 24 Jul 2009 07:04:49 +0000 (07:04 +0000)]
Update CMake
llvm-svn: 76957
Daniel Dunbar [Fri, 24 Jul 2009 07:04:27 +0000 (07:04 +0000)]
Add Twine ADT.
- Not currently used.
llvm-svn: 76956
Ted Kremenek [Fri, 24 Jul 2009 06:55:42 +0000 (06:55 +0000)]
Add doxygen comments and simplify expression.
llvm-svn: 76955
Evan Cheng [Fri, 24 Jul 2009 06:01:46 +0000 (06:01 +0000)]
Convert a test to FileCheck.
llvm-svn: 76954
Chris Lattner [Fri, 24 Jul 2009 05:10:25 +0000 (05:10 +0000)]
hoist section name uniquing logic up to the top-level SectionForGlobal
implementation, eliminating a dupe.
llvm-svn: 76953
Chris Lattner [Fri, 24 Jul 2009 05:02:38 +0000 (05:02 +0000)]
Implement getSectionPrefixForUniqueGlobal to return null, indicating that
darwin does it's own unique and special and wonderful thing.
llvm-svn: 76952
Chris Lattner [Fri, 24 Jul 2009 05:01:55 +0000 (05:01 +0000)]
reduce indentation
llvm-svn: 76951
Chris Lattner [Fri, 24 Jul 2009 04:59:43 +0000 (04:59 +0000)]
simplify code by making special case more obvious
llvm-svn: 76950
Chris Lattner [Fri, 24 Jul 2009 04:52:38 +0000 (04:52 +0000)]
the 'isWeakForLinker' code is common between functions and globals, hoist it
and simplify some other code.
llvm-svn: 76949
Chris Lattner [Fri, 24 Jul 2009 04:49:34 +0000 (04:49 +0000)]
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
Ted Kremenek [Fri, 24 Jul 2009 04:47:11 +0000 (04:47 +0000)]
Introduce a new variant type 'TryResult' to represent the result of
TryEvaluateBool instead of using a raw 'int'. This avoids any
confusion of how 'int' converts to bool, and makes the resultant code
easier to read.
Condense a bunch of 'addSuccessor()' calls in 'if ... else' to use the
ternary operator instead.
llvm-svn: 76947
Chris Lattner [Fri, 24 Jul 2009 04:26:19 +0000 (04:26 +0000)]
document SectionFlags::Named better and make it more easily greppable by
eliminating isNamed.
llvm-svn: 76946
Chris Lattner [Fri, 24 Jul 2009 04:11:40 +0000 (04:11 +0000)]
fix indentation.
llvm-svn: 76945
Chris Lattner [Fri, 24 Jul 2009 04:08:17 +0000 (04:08 +0000)]
use section flags more correctly.
llvm-svn: 76944