Commit Graph

141926 Commits

Author SHA1 Message Date
Andrew Trick b36388a1cb ScheduleDAG: colorize the DOT graph and improve formatting.
llvm-svn: 173431
2013-01-25 07:45:25 +00:00
Shankar Easwaran 3256d4ff62 add elf targethandler
llvm-svn: 173430
2013-01-25 07:39:18 +00:00
Nick Lewycky 29bcacd79d Add missing InGroup for this warning.
llvm-svn: 173429
2013-01-25 07:31:12 +00:00
NAKAMURA Takumi 2a99463b0f clang/test/Driver/output-file-cleanup.c: Mark it as XFAIL:*-mingw32, ppc, for now.
llvm-svn: 173428
2013-01-25 06:56:45 +00:00
Andrew Trick 646eeb6675 ScheduleDAG: Added isBoundaryNode to conveniently detect a common corner case.
This fixes DAG subtree analysis at the boundary.

llvm-svn: 173427
2013-01-25 06:52:30 +00:00
Andrew Trick ffc8097c60 SchedDFS: Complete support for nested subtrees.
Maintain separate per-node and per-tree book-keeping.
Track all instructions above a DAG node including nested subtrees.
Seperately track instructions within a subtree.
Record subtree parents.

llvm-svn: 173426
2013-01-25 06:52:27 +00:00
Andrew Trick e2c3f5c982 MIsched: Improve the interface to SchedDFS analysis (subtrees).
Allow the strategy to select SchedDFS. Allow the results of SchedDFS
to affect initialization of the scheduler state.

llvm-svn: 173425
2013-01-25 06:33:57 +00:00
Andrew Trick f443f11589 ArrayRef reverse iterators.
llvm-svn: 173424
2013-01-25 06:33:52 +00:00
Andrew Trick 030119bc3e whitespace
llvm-svn: 173423
2013-01-25 06:33:50 +00:00
NAKAMURA Takumi dc0c1c3d75 clang/test/Index/crash-recovery-*.c: Drop 'REQUIRES:shell". "test !" is available on Lit win32 since r173421.
llvm-svn: 173422
2013-01-25 06:31:02 +00:00
NAKAMURA Takumi e5297c4636 lit/ShUtil.py: Deprecate '!' in shell expression. It is not sh-compatible.
llvm-svn: 173421
2013-01-25 06:30:36 +00:00
Andrew Trick 5b07eeb24a SchedDFS: Initial support for nested subtrees.
This is mostly refactoring, along with adding an instruction count
within the subtrees and ensuring we only look at data edges.

llvm-svn: 173420
2013-01-25 06:02:44 +00:00
NAKAMURA Takumi d7512b347a clang/test: Drop "REQUIRES:shell" in three tests. They can run on win32.
llvm-svn: 173419
2013-01-25 06:02:11 +00:00
NAKAMURA Takumi eed02e944c clang/test/CodeGenCXX/debug-info-static-member.cpp: Appease targetting msvc to add explicit -target x86_64-unknown-unknown.
with -target i686-win32, you will see;

debug-info-static-member.cpp:11:22: error: in-class initializer for static data member of type 'const float' requires 'constexpr' specifier [-Wstatic-float-init]
  const static float const_b = 3.14;
                     ^         ~~~~
  constexpr

llvm-svn: 173418
2013-01-25 05:58:53 +00:00
Chandler Carruth ceff222dea Switch this code away from Value::isUsedInBasicBlock. That code either
loops over instructions in the basic block or the use-def list of the
value, neither of which are really efficient when repeatedly querying
about values in the same basic block.

What's more, we already know that the CondBB is small, and so we can do
a much more efficient test by counting the uses in CondBB, and seeing if
those account for all of the uses.

Finally, we shouldn't blanket fail on any such instruction, instead we
should conservatively assume that those instructions are part of the
cost.

Note that this actually fixes a bug in the pass because
isUsedInBasicBlock has a really terrible bug in it. I'll fix that in my
next commit, but the fix for it would make this code suddenly take the
compile time hit I thought it already was taking, so I wanted to go
ahead and migrate this code to a faster & better pattern.

The bug in isUsedInBasicBlock was also causing other tests to test the
wrong thing entirely: for example we weren't actually disabling
speculation for floating point operations as intended (and tested), but
the test passed because we failed to speculate them due to the
isUsedInBasicBlock failure.

llvm-svn: 173417
2013-01-25 05:40:09 +00:00
NAKAMURA Takumi 2d765204d9 Create clang/test/Driver/lit.local.cfg.
These files had been ignored.

  - clang_f_opts.h
  - debug-comp-dir.S
  - debug-main-file.S

llvm-svn: 173416
2013-01-25 05:09:37 +00:00
NAKAMURA Takumi fc37344916 Drop "REQUIRES:shell" in tests. They can run on win32.
llvm-svn: 173415
2013-01-25 04:33:40 +00:00
Richard Smith cf656385ea Sync 'in class initialization of static const double' extension up with GCC,
and split it out of -Wgnu into its own warning flag.

 * In C++11, this is now a hard error (GCC has no extension here in C++11 mode).
   The error can be disabled with -Wno-static-float-init, and has a fixit to
   add 'constexpr'.

 * In C++98, this is still an ExtWarn, but is now controlled by
   -Wstatic-float-init as well as -Wgnu.

llvm-svn: 173414
2013-01-25 04:22:16 +00:00
Andrew Trick 44f750a3e5 MISched: Add SchedDFSResult to ScheduleDAGMI to formalize the
interface and allow other strategies to select it.

llvm-svn: 173413
2013-01-25 04:01:04 +00:00
Daniel Dunbar 606420e869 [Frontend] Remove another IsUserSpecified member variable that is now unused.
llvm-svn: 173412
2013-01-25 01:50:47 +00:00
Daniel Dunbar 6b04f1d1be [Frontend] Drop the isUserSupplied argument to InitHeaderSearch, it is unused.
llvm-svn: 173411
2013-01-25 01:50:39 +00:00
Daniel Dunbar c9c57e9181 [Frontend] The -iwithprefix option belongs in the After category, according to
GCC docs.
 - Found by inspection.

llvm-svn: 173410
2013-01-25 01:50:34 +00:00
Daniel Dunbar ae4feb62e0 [Lex] Remove DirectoryLookup.UserSpecified, which is unused.
llvm-svn: 173409
2013-01-25 01:50:28 +00:00
NAKAMURA Takumi f0add23a0e Serialization/GlobalModuleIndex.cpp: Fixup r173405, <cstdio>
llvm-svn: 173408
2013-01-25 01:47:07 +00:00
Jack Carter 07c818d2da This patch implements parsing the .word
directive for the Mips assembler.

Contributer: Vladimir Medic
 
llvm-svn: 173407
2013-01-25 01:31:34 +00:00
Jason Molenda a71919c9d6 <rdar://problem/13072285>
Change the GDBRemoteRegisterContext::AddRegister function to take
its RegisterInfo argument by value instead of using a reference -
it will modify the object and modifying the contents of the 
g_register_infos table in GDBRemoteRegisterContext.cpp can cause a
crash the next time we step through it.

llvm-svn: 173406
2013-01-25 01:05:30 +00:00
Douglas Gregor e060e57bf7 Implement the reader of the global module index and wire it into the
AST reader.

The global module index tracks all of the identifiers known to a set
of module files. Lookup of those identifiers looks first in the global
module index, which returns the set of module files in which that
identifier can be found. The AST reader only needs to look into those
module files and any module files not known to the global index (e.g.,
because they were (re)built after the global index), reducing the
number of on-disk hash tables to visit. For an example source I'm
looking at, we go from 237844 total identifier lookups into on-disk
hash tables down to 126817.

Unfortunately, this does not translate into a performance advantage.
At best, it's a wash once the global module index has been built, but
that's ignore the cost of building the global module index (which
is itself fairly large). Profiles show that the global module index
code is far less efficient than it should be; optimizing it might give
enough of an advantage to justify its continued inclusion.

llvm-svn: 173405
2013-01-25 01:03:03 +00:00
Douglas Gregor c1bbec85a8 Rename the -cc1 option "-generate-module-index" to
"-fmodules-global-index" and expand its behavior to include both the
use and generation of the global module index.

llvm-svn: 173404
2013-01-25 00:45:27 +00:00
Douglas Gregor 00a50f742a Track the number of lookups and hits into the on-disk hash tables for
identifiers within the AST file reader.

llvm-svn: 173403
2013-01-25 00:38:33 +00:00
Daniel Malea 2745d8467b Update test scripts and Makefiles to allow testing with GCC:
- introduce new variable ARCHFLAG in make/Makefile.rules to switch between "-arch" on Mac and "-m" everywhere else
- update testcase makefiles to use LD_EXTRAS instead of LDFLAGS (the former interacts with Makefile.rules badly)
- special treatment for gcc 4.6: replace "-std=c++11" with "-std=c++0x" as the former is not handled correctly
- remove hardcoded "-arch" from test Makefile

This patch should not have any effect on lldb on Mac OS X.

llvm-svn: 173402
2013-01-25 00:31:48 +00:00
Akira Hatanaka 28aed9ca85 [mips] Set flag neverHasSideEffects flag on some of the floating point instructions.
llvm-svn: 173401
2013-01-25 00:20:39 +00:00
Jordan Rose 8b4af2ae88 Clarify comment: "diagnose" is better than "warn" when emitting an error.
Thanks, Dmitri.

llvm-svn: 173400
2013-01-25 00:20:28 +00:00
Andrew Trick b52a8564ce SchedDFS: Refactor and tweak the subtree selection criteria.
For sanity, create a root when NumDataSuccs >= 4. Splitting large
subtrees will no longer be detrimental after my next checkin to handle
nested tree. A magic number of 4 is fine because single subtrees
seldom rejoin more than this. It makes subtrees easier to visualize
and heuristics more sane.

llvm-svn: 173399
2013-01-25 00:12:57 +00:00
Andrew Trick dca637ab36 SchedDFS: Constify interface.
llvm-svn: 173398
2013-01-25 00:12:55 +00:00
Richard Smith f3814ad426 Clean up: since we have FunctionDecl::IsInline, make it store the right value
for template instantiations, and use it to simplify the implementation of
FunctionDecl::isInlined().

This incidentally changes the result of isInlined on a declared-but-not-defined
non-inline member function from true to false. This is sort of a bug fix, but
currently isInlined is only called on function definitions, so it has no visible
effects.

llvm-svn: 173397
2013-01-25 00:08:28 +00:00
Dmitri Gribenko e29dadb640 FileCheck'ize test
llvm-svn: 173396
2013-01-25 00:06:54 +00:00
Jakob Stoklund Olesen e0ef47436c Avoid creating duplicate CFG edges in the IfConversion pass.
Patch by Stefan Hepp.

llvm-svn: 173395
2013-01-24 23:59:08 +00:00
Daniel Malea be230793fb Mark test cases affected by PR 15036 (GCC-generated DWARF causes parser crash)
- Add new decorator "@skipIfGcc" to lldbtest.py

llvm-svn: 173394
2013-01-24 23:52:09 +00:00
Dmitri Gribenko a5ef1517d9 FileCheck'ize test
llvm-svn: 173393
2013-01-24 23:44:04 +00:00
Anna Zaks 69aec48baa [analyzer] Fixup for r173385 and r173386 - initialize the members.
llvm-svn: 173392
2013-01-24 23:40:17 +00:00
Dmitri Gribenko dfbd119c8b FileCheck'ize test
llvm-svn: 173391
2013-01-24 23:34:51 +00:00
Jim Ingham d30df9e24c Don't listen for EXC_RESOURCE exceptions, those should really be handled by the system
handler.  Also put in string translations for a couple of exceptions we were missing.

llvm-svn: 173390
2013-01-24 23:33:19 +00:00
Dmitri Gribenko 53616ad42d FileCheck'ize test
llvm-svn: 173389
2013-01-24 23:29:37 +00:00
Fariborz Jahanian ee19ceb409 Fixes text of diagnostics in integer overflow patch.
llvm-svn: 173388
2013-01-24 23:24:32 +00:00
Dmitri Gribenko 4a44beb5fd FileCheck'ize test/SemaCXX/qualified-names-print.cpp and merge it to other
-ast-print tests

llvm-svn: 173387
2013-01-24 23:21:11 +00:00
Anna Zaks 36d988f023 [analyzer] Add "-analyzer-config mode=[deep|shallow] ".
The idea is to introduce a higher level "user mode" option for
different use scenarios. For example, if one wants to run the analyzer
for a small project each time the code is built, they would use
the "shallow" mode. 

The user mode option will influence the default settings for the
lower-level analyzer options. For now, this just influences the ipa
modes, but we plan to find more optimal settings for them.

llvm-svn: 173386
2013-01-24 23:15:34 +00:00
Anna Zaks 6bab4ef4e8 [analyzer] Replace "-analyzer-ipa" with "-analyzer-config ipa".
The idea is to eventually place all analyzer options under
"analyzer-config". In addition, this lays the ground for introduction of
a high-level analyzer mode option, which will influence the
default setting for IPAMode.

llvm-svn: 173385
2013-01-24 23:15:30 +00:00
Anna Zaks c7f5e69e50 [analyzer] refactor: access IPAMode through the accessor.
llvm-svn: 173384
2013-01-24 23:15:25 +00:00
Jordan Rose b18179da33 scan-build: Add a --keep-empty option for better testing.
SATestBuild expects to compare output directories for each invocation of
scan-build that it runs, but scan-build clears out empty directories by
default. We were coincidentally not getting that behavior until r173294.

llvm-svn: 173383
2013-01-24 23:07:59 +00:00
Renato Golin d4c392e6ff Moving Cost Tables up to share with other targets
llvm-svn: 173382
2013-01-24 23:01:00 +00:00