Commit Graph

34974 Commits

Author SHA1 Message Date
Devang Patel 33227115b9 Add BasicInliner interface.
This interface allows clients to inline bunch of functions with module
level call graph information.:wq

llvm-svn: 40486
2007-07-25 18:00:25 +00:00
Chris Lattner bc15ee2320 test commit
llvm-svn: 40484
2007-07-25 06:15:23 +00:00
Nick Lewycky 5805c46e8f Fix debug info and globals filled with zeros.
llvm-svn: 40483
2007-07-25 03:48:45 +00:00
Chris Lattner 02c0439a44 Fix a couple of bugs, add some new cool stuff.
1. Fix a todo in Parser::ParseTag, to recover better.  On code like
   that in test/Sema/decl-invalid.c it causes us to return a single
   error instead of multiple.
2. Fix an error in Sema::ParseDeclarator, where it would crash if the
   declarator didn't have an identifier.  Instead, diagnose the problem.
3. Start adding infrastructure to track the range of locations covered
   by a declspec or declarator.  This is mostly implemented for declspec,
   but could be improved, it is missing for declarator.

Thanks to Neil for pointing out this crash.

llvm-svn: 40482
2007-07-25 00:24:17 +00:00
Anton Korobeynikov 64b64ae591 Minor cleanup:
- Split EH and debug infiormation
 - Make DwarfWriter more verbose in some cases

llvm-svn: 40481
2007-07-25 00:06:28 +00:00
Dan Gohman f0bb12848f Add const to CanBeFoldedBy, CheckAndMask, and CheckOrMask.
llvm-svn: 40480
2007-07-24 23:00:27 +00:00
Dan Gohman 5a629d4cee A minor simplication in the generated code.
llvm-svn: 40479
2007-07-24 22:58:00 +00:00
Dan Gohman f906c7286f Use movaps to load a v4f32 build_vector of all-constant values into a
register instead of loading each element individually.

llvm-svn: 40478
2007-07-24 22:55:08 +00:00
Owen Anderson d998be79cc Add initial support for non-local memory dependence analysis.
NOTE: This has only been cursorily tested.  Expected improvements soon.

llvm-svn: 40476
2007-07-24 21:52:37 +00:00
Steve Naroff 44fd8ff400 Fix Sema::ParseCallExpr()...it wasn't doing the default array/function promotions on it's argument types.
This resulted in the following errors when compiling promote_types_in_proto.c test...

[dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang test/Parser/promote_types_in_proto.c 
test/Parser/promote_types_in_proto.c:7:24: error: incompatible types passing 'char *[]' to function expecting 'char *const []'
        arrayPromotion(argv);
        ~~~~~~~~~~~~~~ ^~~~
test/Parser/promote_types_in_proto.c:8:27: error: incompatible types passing 'void (char *const [])' to function expecting 'void (char *const [])'
        functionPromotion(arrayPromotion);
        ~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~
2 diagnostics generated.

When fixing this, noticed that both ParseCallExpr() and ParseReturnStmt() were prematurely comparing types for
equivalence. This is incorrect (since the expr. promotions haven't been done yet). To fix this, I moved the
check "down" to Sema::CheckAssignmentConstraints().

I also converted Type::isArrayType() to the modern API (since I needed it). Still more Type predicates to 
convert.

llvm-svn: 40475
2007-07-24 21:46:40 +00:00
Owen Anderson 4c54024319 Make the copy constructor of SmallPtrSet much faster.
llvm-svn: 40474
2007-07-24 21:31:23 +00:00
Anton Korobeynikov 0c46451d2b Heal EH handling stuff by emitting correct offsets to callee-saved registers.
Pretty hackish, but code itself is dirty mess, so we won't make anything worse. :)

llvm-svn: 40472
2007-07-24 21:07:39 +00:00
Chris Lattner 0443a76b11 add documentation skeleton
llvm-svn: 40471
2007-07-24 18:03:18 +00:00
Chris Lattner b3aee6e87f add a bare bones web page
llvm-svn: 40470
2007-07-24 17:59:54 +00:00
Owen Anderson ab6ec2eac2 Add a GVN pass, using the value numbering code I developed for GVNPRE and the
load elimination code from RedundantLoadElimination.

llvm-svn: 40469
2007-07-24 17:55:58 +00:00
Chris Lattner 01e4b243c9 Fix a comment, patch by Kevin Andre!
llvm-svn: 40466
2007-07-24 17:03:04 +00:00
Chris Lattner 366727fca1 implement ast building and trivial semantic analysis of stmt exprs.
This implements test/Sema/stmt_exprs.c

llvm-svn: 40465
2007-07-24 16:58:17 +00:00
Reid Spencer a2e618712d Make output match actual condition tested. Thanks, Duncan.
llvm-svn: 40464
2007-07-24 14:35:44 +00:00
Chris Lattner 1af0e0116a avoid std::string yet again.
llvm-svn: 40462
2007-07-24 06:59:01 +00:00
Chris Lattner 4c4a245475 Use a smallstring instead of an std::string in FileChanged to avoid some malloc traffic.
This speeds up -E on xalancbmk by 2.4%

llvm-svn: 40461
2007-07-24 06:57:14 +00:00
Chris Lattner 830a77fd65 check in an experiment that didn't work out, to allow for future investigation.
llvm-svn: 40460
2007-07-24 06:43:46 +00:00
Chris Lattner 8996ffffe5 Add a cache to SourceManager to accellerate line # lookup. This is a
bottleneck for -E computation, because every token that starts a line needs
to determine *which* line it is on (so -E mode can insert the appropriate 
vertical whitespace).  This optimization improves this common case where
it is striding through the line # table.

This speeds up -E on xalancbmk by 3.2%

llvm-svn: 40459
2007-07-24 05:57:19 +00:00
Devang Patel 13b25df0e9 Unreachable block is not a root node in post dominator tree.
llvm-svn: 40458
2007-07-24 01:02:25 +00:00
Owen Anderson 9baaaa52e6 Rename a lot of things to change FastDLE to RedundantLoadElimination.
llvm-svn: 40457
2007-07-24 00:17:04 +00:00
Owen Anderson 7292a4a93f Rename FastDLE as RedundantLoadElimination.
llvm-svn: 40456
2007-07-24 00:08:38 +00:00
Reid Spencer 0f8fd66a62 1. Make sure we print the Function Value for parameter attribute errors
2. Fold an if statement into the Assert1 macro call.

llvm-svn: 40455
2007-07-23 23:46:43 +00:00
Chris Lattner d63c8a5963 Fix two paste-avoidance bugs I introduced last night. Patch
by Neil Booth.  This fixes Preprocessor/output_paste_avoid.c

llvm-svn: 40454
2007-07-23 23:21:34 +00:00
Reid Spencer 6c2b393f0c Add better verification of attributes on function types. It is not permitted
to use sret or inreg on the function. It is equally illegal to use noreturn
or nounwind on a parameter; they only go with the function. This patch
enforces these rules.

llvm-svn: 40453
2007-07-23 23:09:55 +00:00
Chris Lattner 49a953ab13 fix bogus warnings about potentially uninit vars Size and Align.
Patch by Neil Booth!

llvm-svn: 40452
2007-07-23 22:46:22 +00:00
Chandler Carruth 1b37d5b019 Fix for PR1567, which involves a weird bug on non-32bit architectures and silly C type sizes.
llvm-svn: 40451
2007-07-23 22:42:15 +00:00
Chris Lattner f97dbcb4ba Fix a scoping bug that apple gcc doesn't catch for some reason.
llvm-svn: 40450
2007-07-23 22:23:52 +00:00
Owen Anderson 0a75315d35 Add testcases for FastDLE.
llvm-svn: 40449
2007-07-23 22:18:05 +00:00
Owen Anderson 5e68f0c93d Don't delete volatile loads. Doing so is not safe.
llvm-svn: 40448
2007-07-23 22:05:54 +00:00
Owen Anderson 70fce4c689 Forgot to commit this file.
llvm-svn: 40447
2007-07-23 22:00:03 +00:00
Owen Anderson 21d76e4a0c Fix a comment.
llvm-svn: 40446
2007-07-23 21:51:37 +00:00
Owen Anderson 6aba721425 Add FastDLE, the load-elimination counterpart of FastDSE.
llvm-svn: 40445
2007-07-23 21:48:08 +00:00
Owen Anderson 59a6840d47 Move these tests to use FastDSE instead of old DSE.
llvm-svn: 40444
2007-07-23 20:49:13 +00:00
Dan Gohman b6a8ae20c7 Fix some uses of dyn_cast to be uses of cast.
llvm-svn: 40443
2007-07-23 20:24:29 +00:00
Dan Gohman 17f68f95d8 Delete the svn:executable property on these files, which aren't executable.
llvm-svn: 40441
2007-07-23 19:26:08 +00:00
Owen Anderson 5a201baba9 Fix file header.
llvm-svn: 40440
2007-07-23 18:30:37 +00:00
Chris Lattner 4512cd2cab completely remove a transformation that is unsafe in the face of
undefs.

llvm-svn: 40439
2007-07-23 17:10:17 +00:00
Chris Lattner 54f4d2bd57 correctly verify that default and case are in a switchstmt,
this fixes test/Sema/switch.c.

llvm-svn: 40438
2007-07-23 17:05:23 +00:00
Duncan Sands b063fa59d3 The Ada f-e produces various auxiliary output files
that cannot be suppressed and cannot be redirected:
they are dumped in the current working directory.
When running the testsuite this means that these
files do not end up in the Output directory.  The
best solution I could find is to change directory
into Output before running tests.

llvm-svn: 40437
2007-07-23 15:23:35 +00:00
Duncan Sands 1747440364 For multipart tests, place the parts with no
RUN line in Support.  Give up on sending output
to /dev/null - this cannot always be arranged.

llvm-svn: 40436
2007-07-23 13:41:53 +00:00
Reid Spencer fcd7815249 Restore ability to build archives (oops)
Fix -include line so it doesn't reference /dev/null

llvm-svn: 40429
2007-07-23 08:20:46 +00:00
Reid Spencer 63ebdf7994 Remove bizarre use of /dev/null in a makefile include line that
produces warning from make about bad timestamp on /dev/null

Patch by Holger Schurig.

llvm-svn: 40426
2007-07-23 08:09:15 +00:00
Chris Lattner 5cdfebbf10 avoid creating std::strings in MoveToLine
llvm-svn: 40424
2007-07-23 06:31:11 +00:00
Chris Lattner 93c4ea75ec In OutputString, avoid calling memcpy for really tiny strings.
This speeds up -E on 447.dealII by 5.8%

llvm-svn: 40423
2007-07-23 06:23:07 +00:00
Chris Lattner 0af9823e4d Avoid calling getSpelling at all for identifiers, which are
trivial to handle and very very common.  This speeds up -E on 
447.dealII by 2.5%

llvm-svn: 40422
2007-07-23 06:14:36 +00:00
Chris Lattner 4418ce1091 change the concatenation avoidance algorithm to be partially table-driven
and avoid computing the spelling of tokens when not needed.  This speeds
up -E on 447.dealII by 2.2%

llvm-svn: 40421
2007-07-23 06:09:34 +00:00