Commit Graph

61124 Commits

Author SHA1 Message Date
Bill Wendling 20f0adfc0e This test is failing. Revert for now.
llvm-svn: 73404
2009-06-15 19:10:56 +00:00
Anders Carlsson ebf5be8db9 Include <limits>
llvm-svn: 73403
2009-06-15 19:08:31 +00:00
Douglas Gregor f39bf33dc0 More XML output support, from Olaf Krzikalla!
llvm-svn: 73402
2009-06-15 19:02:54 +00:00
Dan Gohman 19f8b0c3e0 Code cleanups. getSCEVAtScope no longer uses SCEVCouldNotCompute.
llvm-svn: 73401
2009-06-15 18:38:59 +00:00
Bill Wendling 66e104cd11 Add another testcase for r71478.
llvm-svn: 73399
2009-06-15 18:36:34 +00:00
Dan Gohman a8f8a85388 Make the EnableLoadPRE variable static.
llvm-svn: 73398
2009-06-15 18:30:15 +00:00
Dan Gohman 5b2f62059b Fix a typo.
llvm-svn: 73397
2009-06-15 18:22:49 +00:00
Dan Gohman 970da81e8a glibc has two versions of strerror_r, a standards compliant one and a GNU
specific one. The GNU one is chosen when _GNU_SOURCE is defined. g++ always
defines _GNU_SOURCE on linux platforms because glibc's headers won't compile
in C++ mode without it. The GNU strerror_r doesn't always modify the buffer
which causes empty error messages on linux.

This patch changes MakeErrMsg to use the return value of strerror_r to get
the string instead of assuming the buffer will be modified, on GLIBC.

Patch by Benjamin Kramer!

llvm-svn: 73396
2009-06-15 18:05:46 +00:00
Anders Carlsson 475501b01c More parameter pack work.
llvm-svn: 73395
2009-06-15 17:56:45 +00:00
Dan Gohman 1b1b7e1fbd Reword the description of the noredzone attribute.
llvm-svn: 73394
2009-06-15 17:37:09 +00:00
Ted Kremenek a1cc273ab3 Revert r73341.
llvm-svn: 73393
2009-06-15 17:23:35 +00:00
Daniel Dunbar e16b80cb83 More [basic.lookup.unqual] tests.
- p13 and p14 are important failures.

llvm-svn: 73392
2009-06-15 17:18:42 +00:00
Anders Carlsson bc34391f04 Add a new 'Pack' argument kind to TemplateArgument. This is not yet used.
llvm-svn: 73391
2009-06-15 17:04:53 +00:00
Douglas Gregor 15e08d8567 Base SFINAE error suppression counting on the class of an error, not
its (possibly-remapped) diagnostics. Thanks, Chris!

llvm-svn: 73390
2009-06-15 16:52:15 +00:00
Douglas Gregor ac1798a859 Note that we've implemented the right angle brackets extension in C++0x
llvm-svn: 73389
2009-06-15 16:50:45 +00:00
Daniel Dunbar 9e2bd8a572 Test for [basic.lookup.unqual]p3
- Failing, at least in part, because lookup in parser is finding a friend
   function where it shouldn't.

llvm-svn: 73388
2009-06-15 15:56:08 +00:00
Arnold Schwaighofer cb9046cfc8 CheckTailCallReturnConstraints is missing a check on the
incomming chain of the RETURN node. The incomming chain must
be the outgoing chain of the CALL node. This causes the
backend to identify tail calls that are not tail calls. This
patch fixes this.

llvm-svn: 73387
2009-06-15 14:43:36 +00:00
Zhongxing Xu a2937bc3cb 'not magic' => 'is not magic'
llvm-svn: 73386
2009-06-15 13:22:32 +00:00
Torok Edwin 4378bf098c x86_64 was completely missing from the target triples supported by the X86 code
generator!

llvm-svn: 73385
2009-06-15 12:17:44 +00:00
Rafael Espindola 27f6cb18d1 Remove the gcc= option. llvm-gcc uses only as=
Look for as in the path. Doing it here instead
of llvm-gcc because llvm-gcc has nothing as
convenient as sys::Program::FindProgramByName.

llvm-svn: 73383
2009-06-15 10:14:18 +00:00
Eli Friedman b188455eb2 PR4388: get rid of an extra # line directive; in addition to being
unnecessary, this was causing issues for assembler-with-cpp mode, which 
doesn't process the directive.

llvm-svn: 73382
2009-06-15 09:57:52 +00:00
Evan Cheng 1283c6a066 Part 1.
- Change register allocation hint to a pair of unsigned integers. The hint type is zero (which means prefer the register specified as second part of the pair) or entirely target dependent.
- Allow targets to specify alternative register allocation orders based on allocation hint.

Part 2.
- Use the register allocation hint system to implement more aggressive load / store multiple formation.
- Aggressively form LDRD / STRD. These are formed *before* register allocation. It has to be done this way to shorten live interval of base and offset registers. e.g.
v1025 = LDR v1024, 0
v1026 = LDR v1024, 0
=>
v1025,v1026 = LDRD v1024, 0

If this transformation isn't done before allocation, v1024 will overlap v1025 which means it more difficult to allocate a register pair.

- Even with the register allocation hint, it may not be possible to get the desired allocation. In that case, the post-allocation load / store multiple pass must fix the ldrd / strd instructions. They can either become ldm / stm instructions or back to a pair of ldr / str instructions.

This is work in progress, not yet enabled.

llvm-svn: 73381
2009-06-15 08:28:29 +00:00
Chris Lattner 1c0db34815 fix testcase to properly check for the patch in r73195.
llvm-svn: 73380
2009-06-15 05:46:02 +00:00
Chris Lattner 7038cd5247 "This patch implements the method with the GetModuleFileName function for windows."
Patch by Benjamin Kramer!

llvm-svn: 73379
2009-06-15 05:38:04 +00:00
Chris Lattner 6ed7d5964e Minor tweak to -fdiagnostics-print-source-range-info to make it print
ranges more similar to the console output.  Consider:

#define FOO(X, Y) X/ Y

void foo(int *P, int *Q) {
  FOO(P, Q);
}

Before we emitted:

t.c:4:3:{4:3-4:6}{4:3-4:6}: error: invalid operands to binary expression ('int *' and 'int *')
   FOO(P, Q);
   ^~~~~~~~~
...

Note that while we underline the macro args that the range info just includes FOO 
without its macros.  This change teaches the printed ranges to include macro args
also so that we get:

t.c:4:3:{4:3-4:12}{4:3-4:12}: error: invalid operands to binary expression ('int *' and 'int *')
   FOO(P, Q);
   ^~~~~~~~~
...

This fixes rdar://6939599

llvm-svn: 73378
2009-06-15 05:18:27 +00:00
Chris Lattner d9efb6ee52 Fix #pragma GCC system_header by making it insert a virtual linemarker into
the file at the point of the pragma.  This allows clang to know that all
sourcelocations after the pragma are in a system header.

llvm-svn: 73376
2009-06-15 05:02:34 +00:00
Chris Lattner 2228a1ee61 rename test
llvm-svn: 73375
2009-06-15 05:00:02 +00:00
Chris Lattner 77eb1d5333 convert this test to -verify mode.
llvm-svn: 73374
2009-06-15 04:59:21 +00:00
Chris Lattner 8565c4bed4 remove extraneous const qualifier
llvm-svn: 73373
2009-06-15 04:42:32 +00:00
Chris Lattner c68a564cdd I got J and K backward, many thanks to Eli for spotting this!
llvm-svn: 73372
2009-06-15 04:39:05 +00:00
Chris Lattner d20dc87009 If PCH refers to a file that doesn't exist anymore, emit a nice error
like:
fatal error: could not find file '1.h' referenced by PCH file
instead of aborting with an assertion failure, PR4219

llvm-svn: 73371
2009-06-15 04:35:16 +00:00
Chris Lattner 6b8f78eb03 use the new Path::isAbsolute function, fixing a fixme. Patch by Gregory Curfman!
llvm-svn: 73370
2009-06-15 04:25:18 +00:00
Chris Lattner 42670d8b24 remove some old CVS-specific arguments that don't work with SVN.
llvm-svn: 73369
2009-06-15 04:18:54 +00:00
Chris Lattner 3f556daa6e add a new static method to portably determine whether a patch is
absolute or not, based on a patch by Gregory Curfman!

llvm-svn: 73368
2009-06-15 04:17:07 +00:00
Chris Lattner a5e67757dc no really, add the lines :)
llvm-svn: 73367
2009-06-15 04:08:28 +00:00
Chris Lattner ea3621a6b1 implement support for the 'K' asm constraint, PR4347
llvm-svn: 73366
2009-06-15 04:01:39 +00:00
Chris Lattner f2d49da9a8 Fix PR2741 by making our newline tracking be aware of newlines that
can occur in the middle of comment tokens.

llvm-svn: 73365
2009-06-15 01:25:23 +00:00
Chris Lattner c7d2bfacef "GCC emits an __objc_class_name_{classname} symbol for every class, and a corresponding reference to this symbol for every compilation unit that references the class. This causes linker errors when you try linking a program which references some classes but doesn't define them. The attached patch implements this support in clang, so you can compile a class with clang, reference it in a file compiled with GCC, and have it all work correctly."
Patch by David Chisnall!

llvm-svn: 73364
2009-06-15 01:09:11 +00:00
Dan Gohman 4fe64deb7b Fix old-style type names in comments.
llvm-svn: 73362
2009-06-14 23:30:43 +00:00
Dan Gohman 038d02e74e Implement more aggressive folding of add operand lists when
they contain multiplications of constants with add operations.
This helps simplify several kinds of things; in particular it
helps simplify expressions like ((-1 * (%a + %b)) + %a) to %b,
as expressions like this often come up in loop trip count
computations.

llvm-svn: 73361
2009-06-14 22:58:51 +00:00
Dan Gohman 8448acc8ba Specialize DenseMapInfo for SCEVHandle, so that SCEVHandles can be
used as keys in DenseMaps.

llvm-svn: 73360
2009-06-14 22:55:07 +00:00
Dan Gohman 011cf687d7 Check for the short-circuiting condition before performing
the potentially expensive erase.

llvm-svn: 73359
2009-06-14 22:53:57 +00:00
Dan Gohman 862b7d98d1 Do compare constant SCEV values in SCEVComplexityCompare, because
even though the order doesn't matter at the top level of an expression,
it does matter when the constant is a subexpression of an n-ary
expression, because n-ary expressions are sorted lexicographically.

llvm-svn: 73358
2009-06-14 22:51:25 +00:00
Dan Gohman 0652fd59ff Convert several parts of the ScalarEvolution framework to use
SmallVector instead of std::vector.

llvm-svn: 73357
2009-06-14 22:47:23 +00:00
Eli Friedman 1cf2536d6c PR4391: Tweak -ast-print output to generate valid output for edge cases
like "int x = + +3;".

llvm-svn: 73356
2009-06-14 22:39:26 +00:00
Dan Gohman 9b4c85ff62 Add another item to the list of things that indvars does.
llvm-svn: 73355
2009-06-14 22:38:41 +00:00
Duncan Sands b6495b26e5 Testcase for PR4332.
llvm-svn: 73353
2009-06-14 22:22:42 +00:00
Eli Friedman 6282b3cff8 PR4390: Make sure to handle anonymous unions correctly while building
static intializers for structs.

llvm-svn: 73349
2009-06-14 21:41:37 +00:00
Evan Cheng 085caf10be Move register allocation preference (or hint) from LiveInterval to MachineRegisterInfo. This allows more passes to set them.
llvm-svn: 73346
2009-06-14 20:22:55 +00:00
Fariborz Jahanian 45da0c9013 Test modification.
Patch by Jean-Daniel Dupas

llvm-svn: 73343
2009-06-14 16:45:35 +00:00