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
Daniel Dunbar [Fri, 24 Jul 2009 04:01:01 +0000 (04:01 +0000)]
Switch to raw_ostream.
llvm-svn: 76943
Chris Lattner [Fri, 24 Jul 2009 03:55:48 +0000 (03:55 +0000)]
fix a mysterious and scary failure on test/CodeGen/X86/cstring.ll
llvm-svn: 76942
Chris Lattner [Fri, 24 Jul 2009 03:49:17 +0000 (03:49 +0000)]
reduce api exposure: clients shouldn't call SectionKindForGlobal directly.
llvm-svn: 76941
Zhongxing Xu [Fri, 24 Jul 2009 03:41:11 +0000 (03:41 +0000)]
Add getDecl() to CallGraph and CallGraphNode.
llvm-svn: 76940
Zhongxing Xu [Fri, 24 Jul 2009 03:38:27 +0000 (03:38 +0000)]
Constify methods.
llvm-svn: 76939
Chris Lattner [Fri, 24 Jul 2009 03:27:21 +0000 (03:27 +0000)]
make Constant::getRelocationInfo return an enum, as suggested by Duncan.
llvm-svn: 76938
Chris Lattner [Fri, 24 Jul 2009 03:16:53 +0000 (03:16 +0000)]
remove more bits of small section support.
llvm-svn: 76937
Chris Lattner [Fri, 24 Jul 2009 03:14:35 +0000 (03:14 +0000)]
remove more remnants of small section support.
llvm-svn: 76936
Chris Lattner [Fri, 24 Jul 2009 03:11:51 +0000 (03:11 +0000)]
Remove SectionKind::Small*. This was only used on mips, and is apparently
a sad mistake that is regretted. :)
llvm-svn: 76935
John McCall [Fri, 24 Jul 2009 03:03:21 +0000 (03:03 +0000)]
Test commit: make a little stub routine for semantic checking of main().
llvm-svn: 76934
Ted Kremenek [Fri, 24 Jul 2009 02:52:07 +0000 (02:52 +0000)]
Enable the '-warn-security-syntactic' checker option by default.
llvm-svn: 76933
Mike Stump [Fri, 24 Jul 2009 02:49:01 +0000 (02:49 +0000)]
Implement new warning for functions declared 'noreturn' when they fall off the end.
llvm-svn: 76932
Anders Carlsson [Fri, 24 Jul 2009 02:45:50 +0000 (02:45 +0000)]
Get rid of the size parameter to AppendField. No functionality change.
llvm-svn: 76931
Evan Cheng [Fri, 24 Jul 2009 01:05:51 +0000 (01:05 +0000)]
Thumb2 should use the register scavenger.
llvm-svn: 76930
Dan Gohman [Fri, 24 Jul 2009 01:03:59 +0000 (01:03 +0000)]
Fix whitespace.
llvm-svn: 76929
Dan Gohman [Fri, 24 Jul 2009 01:01:06 +0000 (01:01 +0000)]
Give SCEVAddRecExpr no-signed-overflow and no-unsigned-overflow flags.
llvm-svn: 76928
Dan Gohman [Fri, 24 Jul 2009 00:59:53 +0000 (00:59 +0000)]
Give the SCEV class a SubclassData field.
llvm-svn: 76927
Dan Gohman [Fri, 24 Jul 2009 00:55:33 +0000 (00:55 +0000)]
Fix whitespace.
llvm-svn: 76926
Evan Cheng [Fri, 24 Jul 2009 00:53:56 +0000 (00:53 +0000)]
FLDD, FLDS, FCPYD, FCPYS, FSTD, FSTS, VMOVD, VMOVQ maps to the same instructions on all sub-targets.
llvm-svn: 76925
Ted Kremenek [Fri, 24 Jul 2009 00:40:31 +0000 (00:40 +0000)]
Mark destructor of Checker virtual.
llvm-svn: 76924
Richard Osborne [Fri, 24 Jul 2009 00:38:20 +0000 (00:38 +0000)]
Add tests for handling of globals and tls on the XCore. These currently fail
but pass when run against r76652.
llvm-svn: 76923
Owen Anderson [Fri, 24 Jul 2009 00:36:24 +0000 (00:36 +0000)]
Privatize the ConstantVector tables.
llvm-svn: 76922
Eric Christopher [Fri, 24 Jul 2009 00:33:09 +0000 (00:33 +0000)]
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
Dan Gohman [Fri, 24 Jul 2009 00:30:09 +0000 (00:30 +0000)]
Remove the IA-64 backend.
llvm-svn: 76920
David Goodwin [Fri, 24 Jul 2009 00:16:18 +0000 (00:16 +0000)]
Correctly handle the Thumb-2 imm8 addrmode. Specialize frame index elimination more exactly for Thumb-2 to get better code gen.
llvm-svn: 76919
Douglas Gregor [Fri, 24 Jul 2009 00:05:42 +0000 (00:05 +0000)]
We now do complete semantic checking for unions
llvm-svn: 76918
Douglas Gregor [Thu, 23 Jul 2009 23:58:15 +0000 (23:58 +0000)]
Update C++ status to reflect progress on out-of-line definitions of class template members
llvm-svn: 76917
Douglas Gregor [Thu, 23 Jul 2009 23:49:00 +0000 (23:49 +0000)]
This patch fixes the implementations of the __has_trivial_destructor
and __has_trivial_constructor builtin pseudo-functions and
additionally implements __has_trivial_copy and __has_trivial_assign,
from John McCall!
llvm-svn: 76916
Daniel Dunbar [Thu, 23 Jul 2009 23:41:22 +0000 (23:41 +0000)]
Output UTF-16 string literals independent of host byte order.
- Steve, can you take a look at this? It seems like this code should live
elsewhere, and there is a FIXME about having Sema validates the UTF-8 to
UTF-16 conversion.
llvm-svn: 76915
Sean Callanan [Thu, 23 Jul 2009 23:39:34 +0000 (23:39 +0000)]
Added a 2+-byte NOP instruction to the Intel tables,
for the assembler/disassembler to use.
llvm-svn: 76914
Fariborz Jahanian [Thu, 23 Jul 2009 23:32:59 +0000 (23:32 +0000)]
Diagnose when base classes and members to be intialized
with constructors don't have a matching constructor.
llvm-svn: 76913
Owen Anderson [Thu, 23 Jul 2009 23:25:33 +0000 (23:25 +0000)]
Privatize the ConstantStruct table.
llvm-svn: 76912
Mike Stump [Thu, 23 Jul 2009 23:25:26 +0000 (23:25 +0000)]
Refactor and push the evaluation as late as possible.
llvm-svn: 76911
David Greene [Thu, 23 Jul 2009 23:21:10 +0000 (23:21 +0000)]
Write space padding as one string to speed up comment printing.
llvm-svn: 76910
Evan Cheng [Thu, 23 Jul 2009 23:09:51 +0000 (23:09 +0000)]
Thumb2 does not allow the use of "pc" register as part of the load / store address.
llvm-svn: 76909
Daniel Dunbar [Thu, 23 Jul 2009 22:52:48 +0000 (22:52 +0000)]
Factor out map lookup for CFString constants.
llvm-svn: 76908
Anders Carlsson [Thu, 23 Jul 2009 22:52:34 +0000 (22:52 +0000)]
Don't just store the field/bit field info one field, do it for all fields in the union.
llvm-svn: 76907
Mike Stump [Thu, 23 Jul 2009 22:40:11 +0000 (22:40 +0000)]
Some cleanups suggested by Daniel.
llvm-svn: 76906
Ted Kremenek [Thu, 23 Jul 2009 22:29:41 +0000 (22:29 +0000)]
Implement: <rdar://problem/
6335715> rule request: gets() buffer overflow
llvm-svn: 76905