Commit Graph

39214 Commits

Author SHA1 Message Date
Chris Lattner 6d2d1b67ca Fix PR1863: an assertion due to not setting a location on return from
this method.

llvm-svn: 45153
2007-12-18 07:03:30 +00:00
Chris Lattner 78e34a00f4 Fix const propagation bug.
llvm-svn: 45152
2007-12-18 07:02:56 +00:00
Evan Cheng e2dbba5828 SelectionDAG::dump() should print SrcValue of LoadSDNode and StoreSDNode.
llvm-svn: 45151
2007-12-18 07:02:08 +00:00
Chris Lattner 9a2e3cb48d avoid confusing terminology (what is a "word"?), fix scary markup, add section to TOC.
llvm-svn: 45150
2007-12-18 06:18:21 +00:00
Chris Lattner dcb7cc59ae Fix an nice and subtle parser bug reported by Nico Weber.
llvm-svn: 45149
2007-12-18 06:06:23 +00:00
Steve Naroff b723564c79 Add DefaultFunctionArrayConversion() to the indirection operator in Sema::ActOnUnaryOp().
This fixes a bug Chris forwarded from Oliver Hunt...

typedef struct { char name[100]; } entry;
char f1(entry *e) { return *e->name; }

llvm-svn: 45148
2007-12-18 04:06:57 +00:00
Christopher Lamb ac7d631ed2 Don't forget to print address space qualifiers when printing out the type table! Thanks to Gordon Henriksen for pointing this out.
llvm-svn: 45147
2007-12-18 03:49:35 +00:00
Steve Naroff b74406ba98 Fixe bogus error for variable argument methods. Sema::ObjcGetTypeForMethodDefinition() wasn't preserving the isVariadic boolean. Another fix is to avoid synthsizing the function decl entirely, however this is a separate issue that I don't want to deal with now. Also added a FIXME to Sema::CheckFunctionCall(), which is currently emitting a bogus warning.
llvm-svn: 45146
2007-12-18 03:41:15 +00:00
Anders Carlsson aa5c91980e Turns out the LLVMFoldingBuilder can fold InsertElement. Knowing this, we can get rid of our special casing of constants when creating vectors.
llvm-svn: 45145
2007-12-18 02:45:33 +00:00
Dale Johannesen a56aab57e9 Testcase for preceding FE fix
llvm-svn: 45144
2007-12-18 01:58:38 +00:00
Steve Naroff 1d2538cb4d Improve how we find private method decls. This involved:
- Changed Sema::ObjcActOnStartOfMethodDef() to register the methods with the global pools.
- Changed Sema::ActOnInstanceMessage() to look in global pools (should be much less error prone).
- Added a test case to message.m (for lookup that was broken).

Misc changes while I was investigating this...

- Changed Sema::ActOnAtEnd() to call AddFactoryMethodToGlobalPool (this looked like a cut/paste error).
- Added a comment and tweaked another where I was using the first person.

llvm-svn: 45142
2007-12-18 01:30:32 +00:00
Chris Lattner 52a9e40789 add a missed case.
llvm-svn: 45141
2007-12-18 01:19:18 +00:00
Evan Cheng a8288f4294 Remove int_x86_sse2_movl_dq. It's replaced with a string compare.
llvm-svn: 45140
2007-12-18 01:04:25 +00:00
Evan Cheng 61eacb9048 These have matching builtin's in 4.2.
llvm-svn: 45139
2007-12-18 00:52:20 +00:00
Chris Lattner b8be97e239 introduce a new CodeGenModule::getIntrinsic method, which wraps
Intrinsic::getDeclaration, allowing much more terse code.

llvm-svn: 45136
2007-12-18 00:25:38 +00:00
Steve Naroff 2050b0d05a Add __private_extern__ keyword and recognize it. Added a FIXME to indicate there is still work to do.
llvm-svn: 45135
2007-12-18 00:16:02 +00:00
Scott Michel 8172f85e2f i32 immediate constant test case for CellSPU
llvm-svn: 45134
2007-12-17 23:45:52 +00:00
Bill Wendling 34cc217741 s/hasSideEffects/hasUnmodelledSideEffects/g
llvm-svn: 45133
2007-12-17 23:19:54 +00:00
Bill Wendling b3d85a5d4b Add "mayHaveSideEffects" and "neverHasSideEffects" flags to some instructions. I
based what flag to set on whether it was already marked as
"isRematerializable". If there was a further check to determine if it's "really"
rematerializable, then I marked it as "mayHaveSideEffects" and created a check
in the X86 back-end similar to the remat one.

llvm-svn: 45132
2007-12-17 23:07:56 +00:00
Evan Cheng 0e179d015f Bring back int_x86_sse2_movl_dq intrinsic for backward compatibility. Make sure
it's auto-upgraded to a shufflevector instruction.

llvm-svn: 45131
2007-12-17 22:33:23 +00:00
Scott Michel c5cccb9e60 - Restore some i8 functionality in CellSPU
- New test case: nand.ll

llvm-svn: 45130
2007-12-17 22:32:34 +00:00
Ted Kremenek bd5362511d Modified Deserializer::ReadCStr to allow C-strings to be read into a
std::vector<char> starting from any index in the vector.

llvm-svn: 45129
2007-12-17 22:25:12 +00:00
Bill Wendling a2401be121 LD_Fp64m should have "isRematerializable" set.
llvm-svn: 45128
2007-12-17 22:17:14 +00:00
Bill Wendling d5477afc1b Add "hasSideEffects" method to MachineInstrInfo class.
llvm-svn: 45126
2007-12-17 21:53:30 +00:00
Fariborz Jahanian 9b482ba9ec Fixed a comment describing a function
llvm-svn: 45125
2007-12-17 21:48:49 +00:00
Chris Lattner 619e18cce2 implement HeaderMap::LookupFile. I think headermaps are done now. All that is
left is this crazy thing called "testing".

llvm-svn: 45124
2007-12-17 21:38:04 +00:00
Bill Wendling 842ddea5e4 Add MachineLICM.cpp
llvm-svn: 45123
2007-12-17 21:14:45 +00:00
Chris Lattner 9f9a619a9f implement enough helper functions to successfully dump out the
contents of the header map.  Look ma, no assumptions about input data
here (aka, corrupt header maps can't crash the compiler - crazy thought).

llvm-svn: 45122
2007-12-17 21:06:11 +00:00
Fariborz Jahanian 24cb52c9b0 Patch to implemented objective-c's dynamic object pointer qualified with
the protocol list (id<P,...> types).

llvm-svn: 45121
2007-12-17 21:03:50 +00:00
Bill Wendling 939526a930 As per feedback, revised comments to (hopefully) make the different side effect
flags clearer.

llvm-svn: 45120
2007-12-17 21:02:07 +00:00
Chris Lattner a0943c36ed Targets.cpp is gone.
llvm-svn: 45119
2007-12-17 20:56:50 +00:00
Chris Lattner e6a76da763 Make the insertion point with an explicit new instead of the builder.
llvm-svn: 45118
2007-12-17 20:50:59 +00:00
Ted Kremenek a59e0064d3 Removed CFG.cpp's dependence on #including iostream.
llvm-svn: 45116
2007-12-17 19:35:20 +00:00
Devang Patel 725b73ff42 Add cast operators in LLVMFoldingBuilder.
Patch by Richard Pennington.

llvm-svn: 45115
2007-12-17 19:06:26 +00:00
Ted Kremenek 3fbeaea7ee Modified format-string checking to not emit a warning when all of the
following hold:

(1) A vprintf-like function is called that takes the argument list via a
    via_list argument.

(2) The format string is a non-literal that is the parameter value of
    the enclosing function, e.g:
    
    void logmessage(const char *fmt,...) { 
      va_list ap;
      va_start(ap,fmt);
      fprintf(fmt,ap);  // Do not emit a warning.
    }
    
In the future this special case will be enhanced to consult the "format"
attribute attached to a function declaration instead of just allowing a blank
check for all function parameters to be used as format strings to vprintf-like
functions. This will happen when more support for attributes becomes
available.

llvm-svn: 45114
2007-12-17 19:03:13 +00:00
Chris Lattner d39b8c0269 simplify some code, using new scoped_ptr support. Fix a bug in the
cross-endianness case, where we checked the version in the wrong endianness.
Amusingly, the GCC logic that detects mixed endianness hmaps and rejects 
them is dead for this very reason.

llvm-svn: 45113
2007-12-17 18:59:44 +00:00
Chris Lattner 4d5bcd938e cleanup this code, making it more "llvm-like".
Add comments to reset indicating that it deletes its pointer.
Add a new take() method, which can be used to get the pointer
without it being deleted.

llvm-svn: 45112
2007-12-17 18:58:23 +00:00
Chris Lattner 79764a6bee Finish hooking up the scaffolding for headermaps. They can now do everything
except resolve lookups.

llvm-svn: 45111
2007-12-17 18:44:09 +00:00
Ted Kremenek ea63b1575c Format string checker: asprintf does not pass argumnents via va_list.
llvm-svn: 45110
2007-12-17 18:38:31 +00:00
Chris Lattner 4ffe46cbdf Start reading the headermap header, drop the 'errorstr' argument to
the create method.

llvm-svn: 45109
2007-12-17 18:34:53 +00:00
Duncan Sands b5a79d0eaa Make invokes of inline asm legal. Teach codegen
how to lower them (with no attempt made to be
efficient, since they should only occur for
unoptimized code).

llvm-svn: 45108
2007-12-17 18:08:19 +00:00
Fariborz Jahanian 77b713b5d3 Also fixed similar regression for class methods, as well as more indentations.
llvm-svn: 45107
2007-12-17 18:07:01 +00:00
Chris Lattner 8d720d083a Sink getName into DirectoryLookup to simplify the client in clang.
llvm-svn: 45106
2007-12-17 17:57:27 +00:00
Fariborz Jahanian 5f6409532b Fixed a regression caused by refactoring of some meta-data generation routines using iteratgors.
Also fixed indentation problems.

llvm-svn: 45105
2007-12-17 17:56:10 +00:00
Ted Kremenek 73e921fdf2 Fixed 80 col violation.
llvm-svn: 45104
2007-12-17 17:50:39 +00:00
Ted Kremenek 5aa66bdfd6 Added driver option -Wno-format-nonliteral to silence format string related
warnings. This flag is the inverse of to GCC's -Wformat-nonliteral option (in
the clang driver, these warnings are on by default).

Patch provided by Shantonu Sen.

llvm-svn: 45103
2007-12-17 17:50:07 +00:00
Chris Lattner faebb62651 Unbreak -v with framework paths. Patch by Shantonu Sen.
llvm-svn: 45102
2007-12-17 17:42:26 +00:00
David Greene 71eae8a5ee GLIBCXX_DEBUG fix. std::vector<>::end() is invalidated by erase.
llvm-svn: 45101
2007-12-17 17:42:03 +00:00
David Greene c4a80fb574 Get rid of annoying spaces.
llvm-svn: 45100
2007-12-17 17:40:29 +00:00
David Greene 2a5967b36a Fix GLIBCXX_DEBUG errors. Erase invalidates std::vector iterators
passed the erased element.

llvm-svn: 45099
2007-12-17 17:39:51 +00:00