platform/upstream/llvm.git
11 years ago[mips] Delete MipsFunctionInfo::EmitNOAT. Unconditionally print directive
Akira Hatanaka [Fri, 2 Nov 2012 20:56:25 +0000 (20:56 +0000)]
[mips] Delete MipsFunctionInfo::EmitNOAT. Unconditionally print directive
"set .noat" so that the assembler doesn't issue warnings when register $AT is
used.

llvm-svn: 167310

11 years agoXLC supports the same atomic functions as GCC, use them.
Rafael Espindola [Fri, 2 Nov 2012 20:54:45 +0000 (20:54 +0000)]
XLC supports the same atomic functions as GCC, use them.
Patch by Kai.

llvm-svn: 167309

11 years agoFix debug tag type of forward declarations of struct/class in C++.
David Blaikie [Fri, 2 Nov 2012 20:49:01 +0000 (20:49 +0000)]
Fix debug tag type of forward declarations of struct/class in C++.

llvm-svn: 167308

11 years agoImprove x86 android support:
Rafael Espindola [Fri, 2 Nov 2012 20:41:30 +0000 (20:41 +0000)]
Improve x86 android support:
* -Bsymbolic must be added for x86 as well.
* Default CPU name also set to 'core2' for x86 android.
Patch by Edwin Vane.

llvm-svn: 167307

11 years agoAdd test for link flags added by -fcatch-undefined-behavior.
Richard Smith [Fri, 2 Nov 2012 20:34:30 +0000 (20:34 +0000)]
Add test for link flags added by -fcatch-undefined-behavior.

llvm-svn: 167306

11 years agoAdd -lpthread when building with Ubsan on Linux, in preparation for making libclang...
Richard Smith [Fri, 2 Nov 2012 20:32:19 +0000 (20:32 +0000)]
Add -lpthread when building with Ubsan on Linux, in preparation for making libclang-rt.ubsan pull in sanitizer_common, which in turn depends on pthreads.

llvm-svn: 167305

11 years agoChange resolveRelocation parameters so the relocations can find placeholder values...
Andrew Kaylor [Fri, 2 Nov 2012 19:45:23 +0000 (19:45 +0000)]
Change resolveRelocation parameters so the relocations can find placeholder values in the original object buffer.

Some ELF relocations require adding the a value to the original contents of the object buffer at the specified location.  In order to properly handle multiple applications of a relocation, the RuntimeDyld code should be grabbing the original value from the object buffer and writing a new value into the loaded section buffer.  This patch changes the parameters passed to resolveRelocations to accommodate this need.

llvm-svn: 167304

11 years agoSwitched debugserver to use C++11/libc++.
Sean Callanan [Fri, 2 Nov 2012 18:30:51 +0000 (18:30 +0000)]
Switched debugserver to use C++11/libc++.

<rdar://problem/12624679>

llvm-svn: 167303

11 years agoDocumentation: fix typos.
Dmitri Gribenko [Fri, 2 Nov 2012 18:06:51 +0000 (18:06 +0000)]
Documentation: fix typos.

llvm-svn: 167302

11 years agoUpdate test case.
Ted Kremenek [Fri, 2 Nov 2012 17:50:53 +0000 (17:50 +0000)]
Update test case.

llvm-svn: 167301

11 years agoMove -Wimplicit-retain-self to be off-by-default until we can evaluate
Ted Kremenek [Fri, 2 Nov 2012 17:48:49 +0000 (17:48 +0000)]
Move -Wimplicit-retain-self to be off-by-default until we can evaluate
more how noisy it is.

llvm-svn: 167300

11 years agoExtra safeguards to ensure that we never query
Sean Callanan [Fri, 2 Nov 2012 17:09:58 +0000 (17:09 +0000)]
Extra safeguards to ensure that we never query
the runtime if we have complete debug information
for a class.

Also made the Objective-C language runtime return
NULL when asked for the complete debug information
(i.e., information from DWARF, not information from
the runtime) if that information isn't present.  It
used to return a non-authoritative version, which
made it hard for clients to determine whether
complete debug information was available.

<rdar://problem/12608895>

llvm-svn: 167299

11 years ago[Sanitizer] Add internal_isatty to sanitizer_libc and PrintsToTty to determine whethe...
Alexey Samsonov [Fri, 2 Nov 2012 15:18:34 +0000 (15:18 +0000)]
[Sanitizer] Add internal_isatty to sanitizer_libc and PrintsToTty to determine whether error reports are printed to terminal

llvm-svn: 167298

11 years ago[Sanitizer] fix printf unittest on 32-bit arch
Alexey Samsonov [Fri, 2 Nov 2012 14:28:17 +0000 (14:28 +0000)]
[Sanitizer] fix printf unittest on 32-bit arch

llvm-svn: 167297

11 years ago[Sanitizer] move unit test for Printf from tsan to sanitizer_common
Alexey Samsonov [Fri, 2 Nov 2012 12:36:11 +0000 (12:36 +0000)]
[Sanitizer] move unit test for Printf from tsan to sanitizer_common

llvm-svn: 167296

11 years agoFix whitespaces
Alexey Samsonov [Fri, 2 Nov 2012 12:20:34 +0000 (12:20 +0000)]
Fix whitespaces

llvm-svn: 167295

11 years ago[TSan] finally remove TsanPrintf in favor of Printf from sanitizer_common
Alexey Samsonov [Fri, 2 Nov 2012 12:17:51 +0000 (12:17 +0000)]
[TSan] finally remove TsanPrintf in favor of Printf from sanitizer_common

llvm-svn: 167294

11 years agoclang/test/CodeGen/bitfield-promote.c: Add explicit triple for now. It has been faili...
NAKAMURA Takumi [Fri, 2 Nov 2012 09:59:12 +0000 (09:59 +0000)]
clang/test/CodeGen/bitfield-promote.c: Add explicit triple for now. It has been failing for big endian targets, for example, ppc.

llvm-svn: 167293

11 years agoclang/test/CodeGen/bitfield-promote.c: FileCheck-ize.
NAKAMURA Takumi [Fri, 2 Nov 2012 09:59:06 +0000 (09:59 +0000)]
clang/test/CodeGen/bitfield-promote.c: FileCheck-ize.

llvm-svn: 167292

11 years ago[Sanitizer] Use kStderrFd constant instead of hardcoded 2
Alexey Samsonov [Fri, 2 Nov 2012 09:38:47 +0000 (09:38 +0000)]
[Sanitizer] Use kStderrFd constant instead of hardcoded 2

llvm-svn: 167291

11 years ago[Sanitizer]: add __sanitizer_set_report_fd function to alter file descriptor for...
Alexey Samsonov [Fri, 2 Nov 2012 09:23:36 +0000 (09:23 +0000)]
[Sanitizer]: add __sanitizer_set_report_fd function to alter file descriptor for error reports

llvm-svn: 167290

11 years agoEnable the assertion in getIntPtrType (I've audited all users of this method and
Duncan Sands [Fri, 2 Nov 2012 09:02:37 +0000 (09:02 +0000)]
Enable the assertion in getIntPtrType (I've audited all users of this method and
they are now all correct; hopefully the buildbots will agree!).

llvm-svn: 167289

11 years agoAdd a testcase to loop-idiom to cover PR14241 when we start handling
Chandler Carruth [Fri, 2 Nov 2012 08:40:24 +0000 (08:40 +0000)]
Add a testcase to loop-idiom to cover PR14241 when we start handling
strided loops again.

llvm-svn: 167287

11 years agoRevert the switch of loop-idiom to use the new dependence analysis.
Chandler Carruth [Fri, 2 Nov 2012 08:33:25 +0000 (08:33 +0000)]
Revert the switch of loop-idiom to use the new dependence analysis.

The new analysis is not yet ready for prime time. It has a *critical*
flawed assumption, and some troubling shortages of testing. Until it's
been hammered into better shape, let's stick with the working code. This
should be easy to revert itself when the analysis is ready.

Fixes PR14241, a miscompile of any memcpy-able loop which uses a pointer
as the induction mechanism. If you have been seeing miscompiles in this
revision range, you really want to test with this backed out. The
results of this miscompile are a bit subtle as they can lead to
downstream passes concluding things are impossible which are in fact
possible.

Thanks to David Blaikie for the majority of the reduction of this
miscompile. I'll be checking in the test case in a non-revert commit.

Revesions reverted here:

r167045: LoopIdiom: Fix a serious missed optimization: we only turned
         top-level loops into memmove.
r166877: LoopIdiom: Add checks to avoid turning memmove into an infinite
         loop.
r166875: LoopIdiom: Recognize memmove loops.
r166874: LoopIdiom: Replace custom dependence analysis with
         DependenceAnalysis.
llvm-svn: 167286

11 years agoFix an obvious typo that causes an assertion failure when running
Duncan Sands [Fri, 2 Nov 2012 07:49:32 +0000 (07:49 +0000)]
Fix an obvious typo that causes an assertion failure when running
test/Transforms/GVN/rle.ll if the (currently disabled) check for a
pointer type in getIntPtrType is turned on.

llvm-svn: 167285

11 years agoTests: remove ModuleID lines
Tobias Grosser [Fri, 2 Nov 2012 06:09:20 +0000 (06:09 +0000)]
Tests: remove ModuleID lines

llvm-svn: 167284

11 years agoTests: move content of .c files in .ll
Tobias Grosser [Fri, 2 Nov 2012 06:08:39 +0000 (06:08 +0000)]
Tests: move content of .c files in .ll

llvm-svn: 167283

11 years agoFix sign compare warning. Patch by Mahesha HS.
Chandler Carruth [Fri, 2 Nov 2012 05:24:00 +0000 (05:24 +0000)]
Fix sign compare warning. Patch by Mahesha HS.

llvm-svn: 167282

11 years agoDelete lines which do nothing from DiagnosticGroups.td.
Eli Friedman [Fri, 2 Nov 2012 03:35:13 +0000 (03:35 +0000)]
Delete lines which do nothing from DiagnosticGroups.td.

llvm-svn: 167281

11 years ago[libclang] Correct how the index inside the local preprocessed entities array
Argyrios Kyrtzidis [Fri, 2 Nov 2012 02:31:22 +0000 (02:31 +0000)]
[libclang] Correct how the index inside the local preprocessed entities array
is getting converted to a global PreprocessedEntityID.

llvm-svn: 167280

11 years agoAdd missing diagnostic group to format string warning.
Eli Friedman [Fri, 2 Nov 2012 02:14:44 +0000 (02:14 +0000)]
Add missing diagnostic group to format string warning.

llvm-svn: 167279

11 years agoanalyzer-plugin/MainCallChecker.cpp: Fixup corresponding to r167275.
NAKAMURA Takumi [Fri, 2 Nov 2012 02:04:01 +0000 (02:04 +0000)]
analyzer-plugin/MainCallChecker.cpp: Fixup corresponding to r167275.

llvm-svn: 167278

11 years ago[analyzer] Convert some of the harder cases over to ProgramStateTrait macros.
Jordan Rose [Fri, 2 Nov 2012 01:54:42 +0000 (01:54 +0000)]
[analyzer] Convert some of the harder cases over to ProgramStateTrait macros.

Add FIXMEs for the traits visible from multiple translation units.
Currently the macros hide their key types in an anonymous namespace.

llvm-svn: 167277

11 years ago[analyzer] Use nice macros for the common ProgramStateTraits (map, set, list).
Jordan Rose [Fri, 2 Nov 2012 01:54:06 +0000 (01:54 +0000)]
[analyzer] Use nice macros for the common ProgramStateTraits (map, set, list).

Also, move the REGISTER_*_WITH_PROGRAMSTATE macros to ProgramStateTrait.h.

This doesn't get rid of /all/ explicit uses of ProgramStatePartialTrait,
but it does get a lot of them.

llvm-svn: 167276

11 years ago[analyzer] Rename 'EmitReport' to 'emitReport'.
Jordan Rose [Fri, 2 Nov 2012 01:53:40 +0000 (01:53 +0000)]
[analyzer] Rename 'EmitReport' to 'emitReport'.

No functionality change.

llvm-svn: 167275

11 years agoTweak wording and add diagnostic groups to misc diagnostics.
Eli Friedman [Fri, 2 Nov 2012 01:40:23 +0000 (01:40 +0000)]
Tweak wording and add diagnostic groups to misc diagnostics.

llvm-svn: 167274

11 years agoChange diagnostics for enums with fixed underlying type so in C++98 mode, we cite...
Eli Friedman [Fri, 2 Nov 2012 01:34:28 +0000 (01:34 +0000)]
Change diagnostics for enums with fixed underlying type so in C++98 mode, we cite C++11.

llvm-svn: 167273

11 years agolibprofile/CommonProfiling.c: Fix according to C89.
NAKAMURA Takumi [Fri, 2 Nov 2012 01:32:02 +0000 (01:32 +0000)]
libprofile/CommonProfiling.c: Fix according to C89.

llvm-svn: 167272

11 years agoInsert interception point onStartOfTranslationUnit.
Manuel Klimek [Fri, 2 Nov 2012 01:31:03 +0000 (01:31 +0000)]
Insert interception point onStartOfTranslationUnit.

Often users of the ASTMatchers want to add tasks that are done once per
translation unit, for example, cleaning up caches. Combined with the
interception point for the end of source file one can add to the factory
creation, this covers the cases we've seen users need.

llvm-svn: 167271

11 years agoPGO: allows the profile data file name to be specified by the LLVMPROF_OUTPUT
Manman Ren [Fri, 2 Nov 2012 01:10:15 +0000 (01:10 +0000)]
PGO: allows the profile data file name to be specified by the LLVMPROF_OUTPUT
environment variable.

This allows parallel make for profiling code, without it there are file
collisions as each parallel run uses the default file name.

There is already code in the runtime library to specify the output file name
via the command line, but this only works for programs which already process
argc/argv.  This patch builds on that support.

Patch by Alastair Murray.

llvm-svn: 167269

11 years agoWhen finding a '(' after '::', emit error with hint to remove '(' and matching
Richard Trieu [Fri, 2 Nov 2012 01:08:58 +0000 (01:08 +0000)]
When finding a '(' after '::', emit error with hint to remove '(' and matching
')', if found.  Don't crash.
Fixes PR11852.

llvm-svn: 167268

11 years agoSet the MACOSX_DEPLOYMENT_TARGET in a few more places.
Jason Molenda [Fri, 2 Nov 2012 00:35:51 +0000 (00:35 +0000)]
Set the MACOSX_DEPLOYMENT_TARGET in a few more places.

llvm-svn: 167267

11 years agoUpdate the front end to use minsize attribute
Quentin Colombet [Thu, 1 Nov 2012 23:55:47 +0000 (23:55 +0000)]
Update the front end to use minsize attribute

llvm-svn: 167266

11 years agoOutputArg: added an index of the original argument to match the change to
Manman Ren [Thu, 1 Nov 2012 23:49:58 +0000 (23:49 +0000)]
OutputArg: added an index of the original argument to match the change to
InputArg in r165616.

This will enable us to get the actual type for both InputArg and OutputArg.

rdar://9932559

llvm-svn: 167265

11 years agoSet the MACOSX_DEPLOYMENT_TARGET for Debug/Release builds
Jason Molenda [Thu, 1 Nov 2012 23:37:53 +0000 (23:37 +0000)]
Set the MACOSX_DEPLOYMENT_TARGET for Debug/Release builds
(but not BuildAndIntegration builds).

llvm-svn: 167264

11 years agoChange DataExtractor::Dump() to use a series of if..else if
Jason Molenda [Thu, 1 Nov 2012 23:35:19 +0000 (23:35 +0000)]
Change DataExtractor::Dump() to use a series of if..else if
statements instead of a switch for the size of the floating
point types; some architectures sizeof double and sizeof long
double are the same and that's invalid in a switch.

Fix the LLDB_DISABLE_PYTHON ifdef block in FormatManager::LoadObjCFormatters
so it builds on arm again.

llvm-svn: 167263

11 years ago<rdar://problem/12585314>
Greg Clayton [Thu, 1 Nov 2012 23:20:02 +0000 (23:20 +0000)]
<rdar://problem/12585314>

LLDB now provides base class offsets (virtual and non virtual) to Clang's record layout. We previously were told this wasn't necessary, but it is when pragma pack gets involved.

llvm-svn: 167262

11 years agoSimplify: replace getContext().getLangOpts() with just getLangOpts().
Richard Smith [Thu, 1 Nov 2012 22:30:59 +0000 (22:30 +0000)]
Simplify: replace getContext().getLangOpts() with just getLangOpts().

llvm-svn: 167261

11 years agoClean up misapplication of diff.
Richard Smith [Thu, 1 Nov 2012 22:16:43 +0000 (22:16 +0000)]
Clean up misapplication of diff.

llvm-svn: 167260

11 years agoSplit emission of -ftrapv checks and -fcatch-undefined-behavior checks into
Richard Smith [Thu, 1 Nov 2012 22:15:34 +0000 (22:15 +0000)]
Split emission of -ftrapv checks and -fcatch-undefined-behavior checks into
separate functions, since they share essentially no code.

llvm-svn: 167259

11 years agoRemove divison-by-zero checks from -ftrapv. These checks were incompatible with
Richard Smith [Thu, 1 Nov 2012 22:13:39 +0000 (22:13 +0000)]
Remove divison-by-zero checks from -ftrapv. These checks were incompatible with
g++'s -ftrapv, failed to call the -ftrapv overflow handler, and are still
available under -fcatch-undefined-behavior.

llvm-svn: 167258

11 years agoBBVectorize: Commit the rest of the test-case change.
Hal Finkel [Thu, 1 Nov 2012 21:57:27 +0000 (21:57 +0000)]
BBVectorize: Commit the rest of the test-case change.

llvm-svn: 167257

11 years agoBBVectorize: Use target costs for incoming and outgoing values instead of the depth...
Hal Finkel [Thu, 1 Nov 2012 21:50:12 +0000 (21:50 +0000)]
BBVectorize: Use target costs for incoming and outgoing values instead of the depth heuristic.

When target cost information is available, compute explicit costs of inserting and
extracting values from vectors. At this point, all costs are estimated using the
target information, and the chain-depth heuristic is not needed. As a result, it is now, by
default, disabled when using target costs.

llvm-svn: 167256

11 years agoRemove runtime tests from polly test suite
Tobias Grosser [Thu, 1 Nov 2012 21:44:59 +0000 (21:44 +0000)]
Remove runtime tests from polly test suite

Similar to LLVM we now follow the policy of only having LLVM-IR level tests in
the Polly test suite. Testing for miscompilation of larger programs should be
done with the llvm test suite.

llvm-svn: 167255

11 years agorename dylibNamesToOrdinal now that it is an ivar
Nick Kledzik [Thu, 1 Nov 2012 21:44:45 +0000 (21:44 +0000)]
rename dylibNamesToOrdinal now that it is an ivar

llvm-svn: 167254

11 years agoGet rid of hack by making the actual call public. This was causing the lldb-platform...
Greg Clayton [Thu, 1 Nov 2012 21:35:16 +0000 (21:35 +0000)]
Get rid of hack by making the actual call public. This was causing the lldb-platform to not be able to link.

llvm-svn: 167253

11 years agoFix the template type diffing to handle integral template arguments.
Richard Trieu [Thu, 1 Nov 2012 21:29:28 +0000 (21:29 +0000)]
Fix the template type diffing to handle integral template arguments.

llvm-svn: 167252

11 years agoDependences: Add support to calculate memory based dependences
Tobias Grosser [Thu, 1 Nov 2012 21:28:32 +0000 (21:28 +0000)]
Dependences: Add support to calculate memory based dependences

Instead of calculating exact value (flow) dependences, it is also possible to
calculate memory based dependences. Sometimes memory based dependences are a lot
easier to calculate. To evaluate the benefits, we add an option to calculate
memory based dependences (use -polly-value-dependences=false).

llvm-svn: 167251

11 years agoFixes to make the test suite work better when
Sean Callanan [Thu, 1 Nov 2012 21:23:21 +0000 (21:23 +0000)]
Fixes to make the test suite work better when
explicitly pointed at an LLDB framework and
executable.

llvm-svn: 167250

11 years agoSilence -Wformat on platforms where uint64_t is unsigned long.
Matt Beaumont-Gay [Thu, 1 Nov 2012 20:26:42 +0000 (20:26 +0000)]
Silence -Wformat on platforms where uint64_t is unsigned long.

llvm-svn: 167249

11 years agoFixed format string to avoid pointer truncation during 64-bit debugging.
Andrew Kaylor [Thu, 1 Nov 2012 19:49:21 +0000 (19:49 +0000)]
Fixed format string to avoid pointer truncation during 64-bit debugging.

llvm-svn: 167247

11 years ago[ELF] Fix -Woverloaded-virtual
Michael J. Spencer [Thu, 1 Nov 2012 19:46:19 +0000 (19:46 +0000)]
[ELF] Fix -Woverloaded-virtual

llvm-svn: 167246

11 years ago[MachO] Fix use after free.
Michael J. Spencer [Thu, 1 Nov 2012 19:46:06 +0000 (19:46 +0000)]
[MachO] Fix use after free.

llvm-svn: 167245

11 years ago[MachO] Fix uninitialized variables.
Michael J. Spencer [Thu, 1 Nov 2012 19:45:53 +0000 (19:45 +0000)]
[MachO] Fix uninitialized variables.

llvm-svn: 167244

11 years agoUse the relationship models infrastructure to add two relations - getPredOpcode
Pranav Bhandarkar [Thu, 1 Nov 2012 19:13:23 +0000 (19:13 +0000)]
Use the relationship models infrastructure to add two relations - getPredOpcode
and getPredNewOpcode. The first relates non predicated instructions with their
predicated forms and the second relates predicated instructions with their
predicate-new forms.

Patch by Jyotsna Verma!

llvm-svn: 167243

11 years agoMakefile patches from Charles Davis and Daniel Malea (+ one or two tweaks).
Filipe Cabecinhas [Thu, 1 Nov 2012 18:55:16 +0000 (18:55 +0000)]
Makefile patches from Charles Davis and Daniel Malea (+ one or two tweaks).

llvm-svn: 167242

11 years agoobjective-C block meta-data. This patch completes meta-data
Fariborz Jahanian [Thu, 1 Nov 2012 18:32:55 +0000 (18:32 +0000)]
objective-C block meta-data. This patch completes meta-data
generation for captured block variables in arc mode. This includes
inlined version of the meta-data when it can be done. It also includes
severat tests. This is wip. // rdar://12184410.

llvm-svn: 167241

11 years agoMake the FilenameRange of the InclusionDirective callback more accurate,
Argyrios Kyrtzidis [Thu, 1 Nov 2012 17:52:58 +0000 (17:52 +0000)]
Make the FilenameRange of the InclusionDirective callback more accurate,
preserve the macro location of the range end if the filename came from a macro.

Patch by Kim Gräsman!

llvm-svn: 167239

11 years agopeek should set eofbit if sgetc() returns eof.
Howard Hinnant [Thu, 1 Nov 2012 17:32:07 +0000 (17:32 +0000)]
peek should set eofbit if sgetc() returns eof.

llvm-svn: 167238

11 years agoAdd support for generating dwarf debugging info with assembly files
Kevin Enderby [Thu, 1 Nov 2012 17:31:35 +0000 (17:31 +0000)]
Add support for generating dwarf debugging info with assembly files
run through the 'C' preprocessor.  That is pick up the file name
and line numbers from the cpp hash file line comments for the
dwarf file and line numbers tables.

rdar://9275556

llvm-svn: 167237

11 years agoAvoid a crash when trying to parse a line table in the DWARF parser.
Greg Clayton [Thu, 1 Nov 2012 17:28:37 +0000 (17:28 +0000)]
Avoid a crash when trying to parse a line table in the DWARF parser.

llvm-svn: 167236

11 years agoScopDetection: Print line numbers of detected scops
Tobias Grosser [Thu, 1 Nov 2012 16:45:20 +0000 (16:45 +0000)]
ScopDetection: Print line numbers of detected scops

If the flags '-polly-report -g' are given, we print file name and line numbers
for the beginning and end of all detected scops.

  linear-algebra/kernels/gemm/gemm.c:23: Scop start
  linear-algebra/kernels/gemm/gemm.c:42: Scop end
  linear-algebra/kernels/gemm/gemm.c:77: Scop start
  linear-algebra/kernels/gemm/gemm.c:82: Scop end

llvm-svn: 167235

11 years agoRevert multiple adress space changes in Polly
Tobias Grosser [Thu, 1 Nov 2012 16:45:18 +0000 (16:45 +0000)]
Revert multiple adress space changes in Polly

llvm-svn: 167234

11 years agoRichard Smith: This fixes a problem in std::is_constructible for incomplete types...
Howard Hinnant [Thu, 1 Nov 2012 16:32:14 +0000 (16:32 +0000)]
Richard Smith:  This fixes a problem in std::is_constructible for incomplete types, and those types with a user-defined operator,().

llvm-svn: 167233

11 years agoFix an incorrect assert, the LHS can be an LValue.
Rafael Espindola [Thu, 1 Nov 2012 14:32:20 +0000 (14:32 +0000)]
Fix an incorrect assert, the LHS can be an LValue.

llvm-svn: 167232

11 years agollvm/test/lit.cfg: Don't use mcjit to ppc32 yet, not ready.
NAKAMURA Takumi [Thu, 1 Nov 2012 14:28:51 +0000 (14:28 +0000)]
llvm/test/lit.cfg: Don't use mcjit to ppc32 yet, not ready.

Unsupported CPU type!
UNREACHABLE executed at llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:553!

llvm-svn: 167231

11 years ago[asan] don't instrument globals that we've created ourselves (reduces the binary...
Kostya Serebryany [Thu, 1 Nov 2012 13:42:40 +0000 (13:42 +0000)]
[asan] don't instrument globals that we've created ourselves (reduces the binary size a bit)

llvm-svn: 167230

11 years agoAdd a getAddressSpace method to the GEP instruction to mirror that of
Chandler Carruth [Thu, 1 Nov 2012 11:25:55 +0000 (11:25 +0000)]
Add a getAddressSpace method to the GEP instruction to mirror that of
the inttoptr instruction. The conceptual model here is that
'getAddressSpace' refers to the address space of this instruction's
type. It just happens that for GEPs, that is always the same as the
pointer operand's address space. We want both names so that access
patterns can be consistent between different instruction types.

llvm-svn: 167229

11 years agoAdd some consistent doxygen comments for the address space helpers.
Chandler Carruth [Thu, 1 Nov 2012 11:25:28 +0000 (11:25 +0000)]
Add some consistent doxygen comments for the address space helpers.
These clarify that the methods called 'getPointerAddressSpace' apply to
the pointer *operand* of the instruction.

llvm-svn: 167228

11 years agoNormalize the API and doxygen comments for the ptrtoint instruction.
Chandler Carruth [Thu, 1 Nov 2012 11:16:47 +0000 (11:16 +0000)]
Normalize the API and doxygen comments for the ptrtoint instruction.

llvm-svn: 167227

11 years agoRemove a weird static helper from the GEP instruction and just directly
Chandler Carruth [Thu, 1 Nov 2012 10:59:30 +0000 (10:59 +0000)]
Remove a weird static helper from the GEP instruction and just directly
compute the address space in the one place it was used.

Also write the getPointerAddressSpace member in terms of the
getPointerOperandType member.

llvm-svn: 167226

11 years agoAs I'm going to be touching several comments in this file, update the
Chandler Carruth [Thu, 1 Nov 2012 10:46:54 +0000 (10:46 +0000)]
As I'm going to be touching several comments in this file, update the
'@brief' doxygen markup to the now standard '\brief' markup form, in
conformance with the coding standards. This will let me continue to
write new comments in this form without making things inconsistent.

llvm-svn: 167225

11 years agoAdd a test case for PR14233.
Chandler Carruth [Thu, 1 Nov 2012 10:26:36 +0000 (10:26 +0000)]
Add a test case for PR14233.

llvm-svn: 167224

11 years agoTeach Type::getPointerAddressSpace to look through pointer vectors
Chandler Carruth [Thu, 1 Nov 2012 09:37:49 +0000 (09:37 +0000)]
Teach Type::getPointerAddressSpace to look through pointer vectors
politely and document this feature.

This simple API extension then allows us to write all of the
Instructions' address space query methods much more simply. No
functionality change intended here.

llvm-svn: 167223

11 years agoRevert the majority of the next patch in the address space series:
Chandler Carruth [Thu, 1 Nov 2012 09:14:31 +0000 (09:14 +0000)]
Revert the majority of the next patch in the address space series:

r165941: Resubmit the changes to llvm core to update the functions to
         support different pointer sizes on a per address space basis.

Despite this commit log, this change primarily changed stuff outside of
VMCore, and those changes do not carry any tests for correctness (or
even plausibility), and we have consistently found questionable or flat
out incorrect cases in these changes. Most of them are probably correct,
but we need to devise a system that makes it more clear when we have
handled the address space concerns correctly, and ideally each pass that
gets updated would receive an accompanying test case that exercises that
pass specificaly w.r.t. alternate address spaces.

However, from this commit, I have retained the new C API entry points.
Those were an orthogonal change that probably should have been split
apart, but they seem entirely good.

In several places the changes were very obvious cleanups with no actual
multiple address space code added; these I have not reverted when
I spotted them.

In a few other places there were merge conflicts due to a cleaner
solution being implemented later, often not using address spaces at all.
In those cases, I've preserved the new code which isn't address space
dependent.

This is part of my ongoing effort to clean out the partial address space
code which carries high risk and low test coverage, and not likely to be
finished before the 3.2 release looms closer. Duncan and I would both
like to see the above issues addressed before we return to these
changes.

llvm-svn: 167222

11 years agoRevert the series of commits starting with r166578 which introduced the
Chandler Carruth [Thu, 1 Nov 2012 08:07:29 +0000 (08:07 +0000)]
Revert the series of commits starting with r166578 which introduced the
getIntPtrType support for multiple address spaces via a pointer type,
and also introduced a crasher bug in the constant folder reported in
PR14233.

These commits also contained several problems that should really be
addressed before they are re-committed. I have avoided reverting various
cleanups to the DataLayout APIs that are reasonable to have moving
forward in order to reduce the amount of churn, and minimize the number
of commits that were reverted. I've also manually updated merge
conflicts and manually arranged for the getIntPtrType function to stay
in DataLayout and to be defined in a plausible way after this revert.

Thanks to Duncan for working through this exact strategy with me, and
Nick Lewycky for tracking down the really annoying crasher this
triggered. (Test case to follow in its own commit.)

After discussing with Duncan extensively, and based on a note from
Micah, I'm going to continue to back out some more of the more
problematic patches in this series in order to ensure we go into the
LLVM 3.2 branch with a reasonable story here. I'll send a note to
llvmdev explaining what's going on and why.

Summary of reverted revisions:

r166634: Fix a compiler warning with an unused variable.
r166607: Add some cleanup to the DataLayout changes requested by
         Chandler.
r166596: Revert "Back out r166591, not sure why this made it through
         since I cancelled the command. Bleh, sorry about this!
r166591: Delete a directory that wasn't supposed to be checked in yet.
r166578: Add in support for getIntPtrType to get the pointer type based
         on the address space.
llvm-svn: 167221

11 years ago-fcatch-undefined-behavior: Start checking loads and stores for null pointers.
Richard Smith [Thu, 1 Nov 2012 07:22:08 +0000 (07:22 +0000)]
-fcatch-undefined-behavior: Start checking loads and stores for null pointers.
We want the diagnostic, and if the load is optimized away, we still want to
trap it. Stop checking non-default address spaces; that doesn't work in
general.

llvm-svn: 167219

11 years agoBBVectorize: Account for internal shuffle costs
Hal Finkel [Thu, 1 Nov 2012 06:26:34 +0000 (06:26 +0000)]
BBVectorize: Account for internal shuffle costs

When target costs are available, use them to account for the costs of
shuffles on internal edges of the DAG of candidate pairs.

Because the shuffle costs here are currently for only the internal edges,
the current target cost model is trivial, and the chain depth requirement
is still in place, I don't yet have an easy test
case. Nevertheless, by looking at the debug output, it does seem to do the right
think to the effective "size" of each DAG of candidate pairs.

llvm-svn: 167217

11 years ago[clang.py] Add Cursor.get_arguments()
Gregory Szorc [Thu, 1 Nov 2012 05:46:30 +0000 (05:46 +0000)]
[clang.py] Add Cursor.get_arguments()

Patch provided by Matthias Kleine <matthias_kleine@gmx.de>

llvm-svn: 167216

11 years agoCodegen: Selectively copy in array addresses for OpenMP code
Tobias Grosser [Thu, 1 Nov 2012 05:34:55 +0000 (05:34 +0000)]
Codegen: Selectively copy in array addresses for OpenMP code

The detection of values that need to be copied in to the generated OpenMP
subfunction also detects the array base addresses needed in the SCoP. Hence, it
is not necessary to unconditionally copy all the base addresses to the generated
function.

Test cases are modified to reflect this change. Arrays which are global
variables do not occur in the struct passed to the subfunction anymore. A test
case for base address copy-in is added in copy_in_array.{c,ll}.

Committed with slight modifications

Contributed by:  Armin Groesslinger <armin.groesslinger@uni-passau.de>

llvm-svn: 167215

11 years agoCodeGen: Add scop-parameters to the OpenMP context
Tobias Grosser [Thu, 1 Nov 2012 05:34:48 +0000 (05:34 +0000)]
CodeGen: Add scop-parameters to the OpenMP context

In addition to the arrays and clast variables a SCoP statement may also refer to
values defined before the SCoP or to function arguments. Detect these values and
add them to the set of values passed to the function generated for OpenMP
parallel execution of a clast.

Committed with additional test cases and some refactoring.

Contributed by:  Armin Groesslinger  <armin.groesslinger@uni-passau.de>

llvm-svn: 167214

11 years agoCodegen: Copy and restore the ValueMap and ClastVars explicitly
Tobias Grosser [Thu, 1 Nov 2012 05:34:35 +0000 (05:34 +0000)]
Codegen: Copy and restore the ValueMap and ClastVars explicitly

When generating OpenMP or GPGPU code the original ValueMap and ClastVars must be
kept. We already recovered the original ClastVars by reverting the changes, but
we did not keep the content of the ValueMap. This patch keeps now an explicit
copy of both maps and restores them after generating OpenMP or GPGPU code.

This is an adapted version of a patch contributed by:
Armin Groesslinger  <armin.groesslinger@uni-passau.de>

llvm-svn: 167213

11 years agoRemove first argument from Arg::getValue; it's been unused since r105760.
Richard Smith [Thu, 1 Nov 2012 04:30:05 +0000 (04:30 +0000)]
Remove first argument from Arg::getValue; it's been unused since r105760.

llvm-svn: 167211

11 years agoRemove CompilerInvocation::toArgs and clang -cc1test mode. These were untested
Richard Smith [Thu, 1 Nov 2012 03:48:49 +0000 (03:48 +0000)]
Remove CompilerInvocation::toArgs and clang -cc1test mode. These were untested
and apparently unused (and since they are untested, they're presumably also
broken).

llvm-svn: 167210

11 years agoCleanup another place redundant SP maintained
Michael Liao [Thu, 1 Nov 2012 03:47:50 +0000 (03:47 +0000)]
Cleanup another place redundant SP maintained

llvm-svn: 167209

11 years ago[CMake] Add llvm-mcmarkup to check-llvm.
NAKAMURA Takumi [Thu, 1 Nov 2012 02:13:50 +0000 (02:13 +0000)]
[CMake] Add llvm-mcmarkup to check-llvm.

llvm-svn: 167208

11 years agotest/CodeGen/X86/fp-fast.ll: Add +avx.
NAKAMURA Takumi [Thu, 1 Nov 2012 02:13:45 +0000 (02:13 +0000)]
test/CodeGen/X86/fp-fast.ll: Add +avx.

llvm-svn: 167207

11 years agoFix an error message in debugserver so it doesn't print "Unable to
Jason Molenda [Thu, 1 Nov 2012 02:02:59 +0000 (02:02 +0000)]
Fix an error message in debugserver so it doesn't print "Unable to
launch process (null)" because we changed argv while doing argument
parsing.

llvm-svn: 167202

11 years ago[libclang] Introduce clang_Cursor_getReceiverType which returns the CXType for
Argyrios Kyrtzidis [Thu, 1 Nov 2012 02:01:34 +0000 (02:01 +0000)]
[libclang] Introduce clang_Cursor_getReceiverType which returns the CXType for
the receiver of an ObjC message expression.

rdar://12578643

llvm-svn: 167201

11 years agoAdd a few more simple fast-math constant propagations and cancellations.
Owen Anderson [Thu, 1 Nov 2012 02:00:53 +0000 (02:00 +0000)]
Add a few more simple fast-math constant propagations and cancellations.

llvm-svn: 167200