Commit Graph

52468 Commits

Author SHA1 Message Date
Chris Lattner 5cdc94d282 testcase that works now with r62061
llvm-svn: 62062
2009-01-12 00:08:58 +00:00
Chris Lattner ebcbce5ec8 simplify these predicates a bit.
llvm-svn: 62061
2009-01-11 23:59:49 +00:00
Nuno Lopes a0abe62904 make ScalarExprEmitter::EmitCompare() emit the expression with the correct type instead of always zext it to an int
this fixes codegen of simple exprs in C++ like 'if (x != 0)'

llvm-svn: 62060
2009-01-11 23:22:37 +00:00
Daniel Dunbar fd22768b08 ccc: Add fairly complete argument translation for Darwin link step.
- Some things are still hardcoded, and macosx-version-min comparison
   isn't implemented, but otherwise this very closely matches gcc.

 - The one exception is that arguments (like -framework or -Wl,) which are
   treated as linker inputs instead of options are not being
   forwarded yet.

llvm-svn: 62059
2009-01-11 23:13:15 +00:00
Dale Johannesen f84685290a Increase default inlining aggressiveness in partial
compensation for turning off gcc's inliner.  This gets
us closer to the amount of inlining we were getting before.
It is not a win on everything, of course, but seems to
gain overall.

llvm-svn: 62058
2009-01-11 23:11:00 +00:00
Daniel Dunbar 3b43cf6169 ccc: Add several convenience methods for argument translation.
llvm-svn: 62057
2009-01-11 22:42:24 +00:00
Gabor Greif 9722023df8 drats! remove tabs
llvm-svn: 62056
2009-01-11 22:39:04 +00:00
Gabor Greif 1b9921af34 simplify CallSite helper class to not consult the Instruction's
opcode on each delegation.
Instead the information is cached on construction and the cached flag used thereafter.
Introduced two predicates: isCall and isInvoke.

llvm-svn: 62055
2009-01-11 22:33:22 +00:00
Daniel Dunbar 39a5c22c40 ccc: Add and name a host of arguments.
- Also, fix bug in MultipleValuesOption which was accepting joined
   arguments.

 - Add ArgList::getArgs, provides iterator over all arg instances for a
   given option.
 
 - Option definition is very much in need of cleaning...

llvm-svn: 62054
2009-01-11 22:12:37 +00:00
Daniel Dunbar adf3e5bdbc ccc: Give the Host an opportunity to switch ToolChains when binding
archs (as a driver driver).

llvm-svn: 62053
2009-01-11 22:06:22 +00:00
Daniel Dunbar 10d5adf031 ccc: Print -### output on stderr to match gcc.
llvm-svn: 62052
2009-01-11 22:03:55 +00:00
Anders Carlsson 431acd1129 More inline asm fixes
llvm-svn: 62049
2009-01-11 21:23:27 +00:00
Chris Lattner bc088218e6 Implement PR3313, and while I'm at it address a very FAQ.
llvm-svn: 62048
2009-01-11 20:53:49 +00:00
Chris Lattner bd3c7c8b52 Duncan is nervous about undefinedness of % with negatives. I'm
not thrilled about 64-bit % in general, so rewrite to use * instead.

llvm-svn: 62047
2009-01-11 20:41:36 +00:00
Chris Lattner b19151686f do not generated GEPs into vectors where they don't already exist.
We should treat vectors as atomic types, not like arrays.

llvm-svn: 62046
2009-01-11 20:23:52 +00:00
Chris Lattner 171d2d474f Make a couple of cleanups to the instcombine bitcast/gep
canonicalization transform based on duncan's comments:

1) improve the comment about %.
2) within our index loop make sure the offset stays 
   within the *type size*, instead of within the *abi size*.
   This allows us to reason explicitly about landing in tail
   padding and means that issues like non-zero offsets into
   [0 x foo] types don't occur anymore.

llvm-svn: 62045
2009-01-11 20:15:20 +00:00
Chris Lattner 1ee543e184 make paste avoidance avoid pasting digraphs and :: only when digraphs or c++ is enabled
respectively.  Inspired by a patch by Dan Villiom Podlaski Christiansen.

llvm-svn: 62044
2009-01-11 19:48:19 +00:00
Anders Carlsson a948c34b0b Handle readwrite constraints correctly
llvm-svn: 62043
2009-01-11 19:46:50 +00:00
Anders Carlsson 03aaf11502 Forgot to commit this
llvm-svn: 62042
2009-01-11 19:40:10 +00:00
Anders Carlsson da5f56939b Use a common function for emitting asm inputs and remove a FIXME
llvm-svn: 62041
2009-01-11 19:32:54 +00:00
Chris Lattner fa5880e0bb this patch "adds support for specifying multiple dependancy targets using ‘-MT’. Using this patch, I was able to use ‘ccc’ as C compiler for the few C files in LLVM. In my brief testing, the output remains identical to that of GCC."
Patch by Dan Villiom Podlaski Christiansen!

llvm-svn: 62040
2009-01-11 19:28:34 +00:00
Nick Lewycky 93787d1262 Use the spiffy new getAlignmentFromAttrs function.
llvm-svn: 62039
2009-01-11 17:02:06 +00:00
Sebastian Redl f70b683e89 Fix operator precedence.
llvm-svn: 62038
2009-01-11 13:39:06 +00:00
Steve Naroff ba3dc38840 Convert property implementation to DeclContext::addDecl().
This completes the ObjCContainerDecl AST cleanup (for now).

llvm-svn: 62037
2009-01-11 12:47:58 +00:00
Evan Cheng e3108148e2 CheckForPhysRegDependency should not return copy cost. It's not used. No functionality change.
llvm-svn: 62036
2009-01-11 08:53:35 +00:00
Bill Wendling 8d069ef872 Fix naming of file.
llvm-svn: 62035
2009-01-11 01:25:51 +00:00
Steve Naroff 0c0f5bae80 A few property related cleanups to ObjCContainerDecl AST.
llvm-svn: 62034
2009-01-11 01:06:09 +00:00
Dan Gohman aaa679b270 Fix the example syntax for named sections.
llvm-svn: 62033
2009-01-11 00:40:00 +00:00
Sebastian Redl 6a8002eac7 Convert some more actions to smart pointers.
No performance regression in my basic test.
Also fixed a type error in ActOnFinishSwitchStmt's arguments (body is a stmt).

llvm-svn: 62032
2009-01-11 00:38:46 +00:00
Steve Naroff 5a7dd78ba2 Fix a misleading comment.
llvm-svn: 62031
2009-01-10 22:55:25 +00:00
Fariborz Jahanian 0196a1cd2b This patch fixes the code gen failures which was a fallout from
not merging protocol properties into the classes which
use those protocols. With this patch, all my exceutable
test pass again.

llvm-svn: 62030
2009-01-10 21:06:09 +00:00
Evan Cheng 8e7d88b916 This is a dup of pr2659.ll.
llvm-svn: 62029
2009-01-10 19:06:32 +00:00
Fariborz Jahanian 8630b2d992 Explicit declaration of property setters over-ride
prohibition of 'readonly' properties in an assignment.

llvm-svn: 62028
2009-01-10 18:43:55 +00:00
Zhongxing Xu 776b2fa1ea add a bunch of castToDeclContext/castFromDeclContext methods.
llvm-svn: 62027
2009-01-10 14:38:38 +00:00
Zhongxing Xu 1857139755 add castToDeclContext/castFromDeclContext methods to RecordDecl.
llvm-svn: 62026
2009-01-10 14:14:16 +00:00
Bill Wendling c56c37f039 Adding unittests for SmallVector. Test by Talin.
llvm-svn: 62025
2009-01-10 12:56:31 +00:00
Evan Cheng 5a272e79e5 80 col violation.
llvm-svn: 62024
2009-01-10 03:33:22 +00:00
Devang Patel af7d04207c Reduce initial small vector sizes.
llvm-svn: 62023
2009-01-10 02:42:49 +00:00
Devang Patel 5491f25810 Fix thinko. Create parent scope if parent descriptor is *not* null.
llvm-svn: 62022
2009-01-10 02:34:18 +00:00
Daniel Dunbar cb8d7e131c ccc: Introduce ToolChains for mapping Actions to Tools which can
perform them.

 - A ToolChain is a coherent set of tools use in a compilation
   process. The idea is that a ToolChain holds roughly the information
   (specs, search paths, etc.) that is in a single gcc binary.

 - The default ToolChain is selected by the host and will generally
   correspond to what the default system compiler would do. However,
   this can be over-riden for a variety of purposes, for example the
   by the driver driver or for testing.

llvm-svn: 62021
2009-01-10 02:07:54 +00:00
Daniel Dunbar eacf5b174d ccc: Add generic assembler & linker tools which effectively shell out
to gcc.

llvm-svn: 62020
2009-01-10 02:00:04 +00:00
Daniel Dunbar 96977ae536 ccc: Add information about whether type can be user specified (a -x
argument) to InputType.

llvm-svn: 62019
2009-01-10 01:50:42 +00:00
Douglas Gregor b37080a969 Allow multiple Microsoft calling-convention keywords. Fixes rdar://problem/6486133
llvm-svn: 62018
2009-01-10 00:48:18 +00:00
Fariborz Jahanian d9c238dc9f assert if attempting to code gen. a property setter/getter
coming from a protocol.

llvm-svn: 62017
2009-01-10 00:13:01 +00:00
Douglas Gregor 498b58ceb1 Don't bother setting NextDeclarator for EnumConstantDecls. It isn't used
llvm-svn: 62016
2009-01-09 23:23:35 +00:00
Evan Cheng ed74d8ac2a Duplicated node may produce a non-physical register def.
llvm-svn: 62015
2009-01-09 22:44:02 +00:00
Douglas Gregor 658b9550bb When we see a reference to a struct, class, or union like "struct X"
that is neither a definition nor a forward declaration and where X has
not yet been declared as a tag, introduce a declaration
into the appropriate scope (which is likely *not* to be the current
scope). The rules for the placement of the declaration differ slightly
in C and C++, so we implement both and test the various corner
cases. This implementation isn't 100% correct due to some lingering
issues with the function prototype scope (for a function parameter
list) not being the same scope as the scope of the function
definition. Testcase is FIXME'd; this probably isn't an important issue.

Addresses <rdar://problem/6484805>.

llvm-svn: 62014
2009-01-09 22:42:13 +00:00
Daniel Dunbar 60e734782f Add utils/SummarizeErrors.
- Little script for scanning a compile log and summarizing warnings,
   errors, assertions, and crashes.
 - Is very slow, and stack trace regexs probably only work on Darwin.

llvm-svn: 62013
2009-01-09 22:39:43 +00:00
Sebastian Redl 6138f2b4d8 Add some comments to the virtual work. Thanks to Doug Gregor for the review.
llvm-svn: 62012
2009-01-09 22:29:03 +00:00
Daniel Dunbar 61f97e290a ccc: Get host information via Driver methods.
llvm-svn: 62011
2009-01-09 22:21:24 +00:00