Commit Graph

38830 Commits

Author SHA1 Message Date
Steve Naroff f727faf2ed Explicitly set the string literal type from "char *" to "constant array of char".
At this point, I am fairly certain the front-end is correct. Unfortunately, the back-end is still unhappy.

That said, I've commented out the two lines in globalinit.c that are causing problems.

Chris, please have a look...thanks!

llvm-svn: 44823
2007-12-11 00:00:01 +00:00
Ted Kremenek c0870605be Fixed bug in CFG::PopulateBlkExprMap where the ordering
between fetching the size of the expression map (for use as
the next integer id for an Expr*) and the creation of the
entry in the map could be non-deterministic.  This could
cause the size of the map to be incremented prior to the
index being determine.

On Linux the map entry would be created first, causing the
map to the "size" to be incremented prior to it being
queried. On Mac OS X we had the reverse behavior. Now the
size is always queried prior to the new id being inserted
into the map.

This was the real cause of the bit-overrun triggered in
PR 1847:

  http://llvm.org/bugs/show_bug.cgi?id=1847
  
Also reverted the change in patch 44813, which was a bogus
fix to this problem:

  http://llvm.org/viewvc/llvm-project?rev=44813&view=rev

llvm-svn: 44822
2007-12-10 23:58:39 +00:00
Ted Kremenek f182e81d85 Added missing inclusion of stdarg.h. Now CGExprScalar.cpp
compiles again on Linux.

llvm-svn: 44821
2007-12-10 23:44:32 +00:00
Anton Korobeynikov 21ade5880b Hey, English is not my native language :)
llvm-svn: 44820
2007-12-10 23:10:20 +00:00
Anton Korobeynikov 77eb5e649d Clarify the need of CFI() stuff
llvm-svn: 44819
2007-12-10 23:08:35 +00:00
Anton Korobeynikov a6b0f7e244 Provide convenient way to disable CFI stuff for old/broken assemblers.
Use it for Darwin.

llvm-svn: 44818
2007-12-10 23:04:38 +00:00
Chris Lattner d2265b45ae Fix PR1850 by removing an unsafe transformation from VMCore/ConstantFold.cpp.
Reimplement the xform in Analysis/ConstantFolding.cpp where we can use
targetdata to validate that it is safe.  While I'm in there, fix some const
correctness issues and generalize the interface to the "operand folder".

llvm-svn: 44817
2007-12-10 22:53:04 +00:00
Steve Naroff 91f78080e3 Add support for initializing char arrays from string literals.
Adapted from a patch by Anders Carlsson.

llvm-svn: 44816
2007-12-10 22:44:33 +00:00
Ted Kremenek 9a698a1da7 Added two bounds checks to the BitVector class to detect
out-of-bounds bit accesses.  The checks are only performed
in a Debug build.

llvm-svn: 44815
2007-12-10 22:28:35 +00:00
Chris Lattner ea9ac34d18 split isBinaryOp into a static and member version.
llvm-svn: 44814
2007-12-10 22:18:53 +00:00
Ted Kremenek b4785e3054 Fixed off-by-one-error when resizing Bitvectors used for
dataflow analysis over expressions and decls.

This should fix bug 1847:

http://llvm.org/bugs/show_bug.cgi?id=1847

Thanks to Török Edwin for providing a test case that
identified the problem.

llvm-svn: 44813
2007-12-10 22:01:22 +00:00
John Criswell fa06f0203b Fix some wording.
llvm-svn: 44810
2007-12-10 20:26:29 +00:00
Chris Lattner 433fb26707 add support for implicit cast from array to pointer that is not the element
type.

llvm-svn: 44809
2007-12-10 19:50:32 +00:00
Anders Carlsson d0113e4be3 Revert change that broke the build.
llvm-svn: 44808
2007-12-10 19:46:20 +00:00
Chris Lattner e665077f9a disable case that makes this fail.
llvm-svn: 44807
2007-12-10 19:44:50 +00:00
Anders Carlsson b9eb82c3ee Add EmitShuffleVector helper method.
llvm-svn: 44806
2007-12-10 19:35:18 +00:00
Chuck Rose III 900a13e82c Add StringPool + new CodeGen files to win32 build
llvm-svn: 44805
2007-12-10 19:31:09 +00:00
Anders Carlsson dc16e8f299 Address comments from Chris.
llvm-svn: 44804
2007-12-10 19:30:18 +00:00
Chris Lattner 8a72a7d586 Disable cfi directives for now, darwin does't support them.
These should probably be something like:

  CFI(".cfi_def_cfa_offset 16\n")

where CFI is defined to a noop on darwin and other platforms
that don't support those directives.

llvm-svn: 44803
2007-12-10 19:10:18 +00:00
Duncan Sands 9f76be61d1 Make PruneEH update the nounwind/noreturn attributes
on functions as it calculates them.

llvm-svn: 44802
2007-12-10 19:09:40 +00:00
Chris Lattner 456078d50d minor edits.
llvm-svn: 44801
2007-12-10 18:56:37 +00:00
Devang Patel b3ae8d7dc2 Add assert to flag incomplete bit-field support.
llvm-svn: 44800
2007-12-10 18:52:06 +00:00
Devang Patel 3c31b54b47 Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.
llvm-svn: 44799
2007-12-10 18:37:40 +00:00
Devang Patel bb5c0d8960 Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.
llvm-svn: 44798
2007-12-10 18:25:34 +00:00
Ted Kremenek 256a15d532 Added newline to end of file.
llvm-svn: 44797
2007-12-10 18:01:25 +00:00
Duncan Sands 5c65cb4633 Fix PR1836: in the interpreter, read and write apints
using the minimum possible number of bytes.  For little
endian targets run on little endian machines, apints are
stored in memory from LSB to MSB as before.  For big endian
targets on big endian machines they are stored from MSB to
LSB which wasn't always the case before (if the target and
host endianness doesn't match values are stored according
to the host's endianness).  Doing this requires knowing the
endianness of the host, which is determined when configuring -
thanks go to Anton for this.  Only having access to little
endian machines I was unable to properly test the big endian
part, which is also the most complicated...

llvm-svn: 44796
2007-12-10 17:43:13 +00:00
Chris Lattner 80c54698e8 be more clear about what we are comparing.
llvm-svn: 44795
2007-12-10 17:38:50 +00:00
Anton Korobeynikov 657be86229 And finally annotate X86-64 version of callback.
All bad stuff from SSE version is implicitely inherited :)

llvm-svn: 44794
2007-12-10 15:27:07 +00:00
Anton Korobeynikov 88e9d082d8 Provide annotation for SSE version of callback. It's even more
broken, because doesn't mark xmm regs properly

llvm-svn: 44793
2007-12-10 15:13:55 +00:00
Anton Korobeynikov 81e9dc4af7 Annotate JIT callback function with call frame infromation.
This will allow us (theoretically) to unwind through JITer.
The code wasn't verified, so I'm pretty sure offsets are wrong :)

llvm-svn: 44792
2007-12-10 14:54:42 +00:00
Duncan Sands 81b25817f9 It looks like this has been broken for some time -
get it to compile.

llvm-svn: 44791
2007-12-10 14:43:10 +00:00
Anders Carlsson 1b9853a9f8 Forgot this file.
llvm-svn: 44790
2007-12-10 08:48:18 +00:00
Chris Lattner c3307e2418 fixes, thanks to Nico Weber
llvm-svn: 44789
2007-12-10 08:21:12 +00:00
Chris Lattner 428760a6e6 clean up the TOC.
llvm-svn: 44788
2007-12-10 08:19:29 +00:00
Chris Lattner e396aaae28 finish the features description.
llvm-svn: 44787
2007-12-10 08:12:49 +00:00
Owen Anderson ba61806ef1 A little more progress on StrongPHIElimination, now that I have a better sense of
how the CodeGen machinery works.

llvm-svn: 44786
2007-12-10 08:07:09 +00:00
Christopher Lamb d202e03fe5 Improve branch folding by recgonizing that explict successor relationships impact the value of fall-through choices.
llvm-svn: 44785
2007-12-10 07:24:06 +00:00
Chris Lattner b6a8cfea24 now with hackability.
llvm-svn: 44784
2007-12-10 07:23:52 +00:00
Chris Lattner aa085d36e2 reorganize features, expound on a couple more.
llvm-svn: 44783
2007-12-10 07:14:08 +00:00
Chris Lattner e404df76c0 incorporate suggestions from Joel Nelson.
llvm-svn: 44782
2007-12-10 06:01:32 +00:00
Chris Lattner f572f3364d start making features be a more detailed description of the features/goals section on the main page.
llvm-svn: 44781
2007-12-10 05:52:05 +00:00
Chris Lattner 27a2709cfb add toc
llvm-svn: 44780
2007-12-10 05:23:01 +00:00
Chris Lattner b072569682 don't duplicate goals on the features page.
llvm-svn: 44779
2007-12-10 05:20:47 +00:00
Chris Lattner ab44e15ce7 update status
llvm-svn: 44778
2007-12-10 05:11:40 +00:00
Chris Lattner fdfd014270 edits, switch the goals/why section.
llvm-svn: 44777
2007-12-10 05:10:14 +00:00
Chris Lattner 5a7359c8c2 minor edits
llvm-svn: 44776
2007-12-10 05:06:15 +00:00
Gordon Henriksen 4b904b9627 Delete the CollectorNamePool if it should become empty.
llvm-svn: 44775
2007-12-10 03:35:18 +00:00
Gordon Henriksen dc5cafb74e Fix a typo spotted by Nick Lewycky.
llvm-svn: 44774
2007-12-10 03:30:21 +00:00
Gordon Henriksen 71183b6739 Adding a collector name attribute to Function in the IR. These
methods are new to Function:

  bool hasCollector() const;
  const std::string &getCollector() const;
  void setCollector(const std::string &);
  void clearCollector();

The assembly representation is as such:

  define void @f() gc "shadow-stack" { ...

The implementation uses an on-the-side table to map Functions to 
collector names, such that there is no overhead. A StringPool is 
further used to unique collector names, which are extremely
likely to be unique per process.

llvm-svn: 44769
2007-12-10 03:18:06 +00:00
Chris Lattner e31cd5b564 add link to comparison page.
llvm-svn: 44763
2007-12-10 02:25:51 +00:00