platform/upstream/llvm.git
9 years agoMIR Serialization: Serialize the jump table index operands.
Alex Lorenz [Wed, 15 Jul 2015 23:38:35 +0000 (23:38 +0000)]
MIR Serialization: Serialize the jump table index operands.

Reviewers: Duncan P. N. Exon Smith
llvm-svn: 242358

9 years agoMIR Serialization: Serialize the jump table info.
Alex Lorenz [Wed, 15 Jul 2015 23:31:07 +0000 (23:31 +0000)]
MIR Serialization: Serialize the jump table info.

The jump table info is serialized using a YAML mapping that contains its kind
and a YAML sequence of jump table entries. A jump table entry is a YAML mapping
that has an ID and an inline YAML sequence of machine basic block references.

The testcase 'CodeGen/MIR/X86/jump-table-info.mir' doesn't have any instructions
because one of them contains a jump table index operand. The jump table index
operands will be serialized in a follow up patch, and the appropriate
instructions will be added to this testcase.

Reviewers: Duncan P. N. Exon Smith
llvm-svn: 242357

9 years agoAdd a test for r242281 from an old patch of mine.
Sean Silva [Wed, 15 Jul 2015 23:23:02 +0000 (23:23 +0000)]
Add a test for r242281 from an old patch of mine.

This isn't thorough, but should serve as a sanity check.

llvm-svn: 242356

9 years agoRemove a private member of BranchProbabilityInfo which is not used at all.
Cong Hou [Wed, 15 Jul 2015 23:20:34 +0000 (23:20 +0000)]
Remove a private member of BranchProbabilityInfo which is not used at all.

The member to be removed is LoopInfo *LI.

llvm-svn: 242355

9 years agollvm-ar: Don't write the directory in the string table.
Rafael Espindola [Wed, 15 Jul 2015 23:15:33 +0000 (23:15 +0000)]
llvm-ar: Don't write the directory in the string table.

We were already doing the right thing for short file names, but not long
ones.

llvm-svn: 242354

9 years agoCOFF: Fix offset in x86 delay-load thunks.
Rui Ueyama [Wed, 15 Jul 2015 23:01:36 +0000 (23:01 +0000)]
COFF: Fix offset in x86 delay-load thunks.

llvm-svn: 242353

9 years agoAdded the ability to get JSON thread stop info with thread ID and stop info only...
Greg Clayton [Wed, 15 Jul 2015 22:59:03 +0000 (22:59 +0000)]
Added the ability to get JSON thread stop info with thread ID and stop info only in the normal stop reply packets using the new "jthreads" key value pair.

This allows stepping operations that don't ever do a public stop to get all the info they need without having to send a jThreadsInfo packet since those tend to be large.

This patch will be followed by a patch that will detect when we do a public stop, and when that happens we will send a jThreadsInfo packet at that time to get all expedited registers and memory.

llvm-svn: 242352

9 years agoadding tests for various dtor decl types
Naomi Musgrave [Wed, 15 Jul 2015 22:57:10 +0000 (22:57 +0000)]
adding tests for various dtor decl types

Reviewers: eugenis, kcc

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11189

llvm-svn: 242351

9 years ago[probile] Fix memory leak introduced in r241824.
Alexey Samsonov [Wed, 15 Jul 2015 22:50:39 +0000 (22:50 +0000)]
[probile] Fix memory leak introduced in r241824.

llvm-svn: 242350

9 years agoCreate a wrapper pass for BranchProbabilityInfo.
Cong Hou [Wed, 15 Jul 2015 22:48:29 +0000 (22:48 +0000)]
Create a wrapper pass for BranchProbabilityInfo.

This new wrapper pass is useful when we want to do branch probability analysis conditionally (e.g. only in PGO mode) but don't want to add one more pass dependence.

http://reviews.llvm.org/D11241

llvm-svn: 242349

9 years agoSilence GCC -Wparenthesis warning
David Majnemer [Wed, 15 Jul 2015 22:48:26 +0000 (22:48 +0000)]
Silence GCC -Wparenthesis warning

llvm-svn: 242348

9 years agoFor new archive member we only need to store the full path.
Rafael Espindola [Wed, 15 Jul 2015 22:46:53 +0000 (22:46 +0000)]
For new archive member we only need to store the full path.

We were storing both the path and the file name, which was redundant
and easy to get confused up with.

llvm-svn: 242347

9 years ago[clang-cl] Use the Windows response file tokenizer
Reid Kleckner [Wed, 15 Jul 2015 22:42:37 +0000 (22:42 +0000)]
[clang-cl] Use the Windows response file tokenizer

We were still using the Unix response file tokenizer for all driver
modes. This was difficult to get right in the beginning because there is
a circular dependency. The Driver class also can't officially determine
its mode until it can see all possible --driver-mode= flags, and those
flags could come from the response file.

Now we use the Windows parsing algorithm if the program name looks like
clang-cl, or if the --driver-mode=cl flag is present on the main command
line.

Fixes PR23709.

Reviewers: hans

Differential Revision: http://reviews.llvm.org/D11229

llvm-svn: 242346

9 years ago[LoopUnswitch] Add an else clause to IsTrivialUnswitchCondition() when checking Heade...
Chen Li [Wed, 15 Jul 2015 22:41:13 +0000 (22:41 +0000)]
[LoopUnswitch] Add an else clause to IsTrivialUnswitchCondition() when checking HeaderTerm instruction type

Summary:
This is a trivial code change with no functionality effect.

When LoopUnswitch determines trivial unswitch condition, it checks whether the loop header's terminator instruction is a branch instruction or switch instruction since trivial unswitch condition can only apply to these two instruction types. The current code does not fail the check directly on other instruction types, but check the nullness of LoopExitBB variable instead. The added else clause makes the check fail immediately on other instruction types and makes the code more obvious.

Reviewers: reames

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11239

llvm-svn: 242345

9 years ago[Makefiles] One more library rename to align with CMake
Keno Fischer [Wed, 15 Jul 2015 22:39:44 +0000 (22:39 +0000)]
[Makefiles] One more library rename to align with CMake

This one I accidentally missed last time because I confused it with
the lldbUtility library. After this, all makefile libraries should
have the same names as their CMake counterparts.

llvm-svn: 242344

9 years agoCOFF: Implement x86 delay-load thunks.
Rui Ueyama [Wed, 15 Jul 2015 22:26:57 +0000 (22:26 +0000)]
COFF: Implement x86 delay-load thunks.

llvm-svn: 242343

9 years agoCOFF: Fix mangled dllexported names.
Rui Ueyama [Wed, 15 Jul 2015 22:21:08 +0000 (22:21 +0000)]
COFF: Fix mangled dllexported names.

If a symbol is exported as /export:foo, and foo is resolved as a
mangled name (_foo@<number> or ?foo@@Y...), that mangled name should
be written to the export table. Previously, we wrote the original
name to the export table.

llvm-svn: 242342

9 years agotest-release.sh: Run both .o files through sed before comparing them
Hans Wennborg [Wed, 15 Jul 2015 22:18:25 +0000 (22:18 +0000)]
test-release.sh: Run both .o files through sed before comparing them

On some systems (e.g. Mac OS X), sed will add a newline to the end of
the output if there wasn't one already. This would cause false
cmp errors since the .o file from Phase 2 was passed through sed and
the one from Phase 3 wasn't. Work around this by passing both through
sed.

llvm-svn: 242341

9 years agoTargetRegisterInfo: Provide a way to check assigned registers in getRegAllocationHints()
Matthias Braun [Wed, 15 Jul 2015 22:16:00 +0000 (22:16 +0000)]
TargetRegisterInfo: Provide a way to check assigned registers in getRegAllocationHints()

Pass a const reference to LiveRegMatrix to getRegAllocationHints()
because some targets can prodive better hints if they can test whether a
physreg has been used for register allocation yet.

llvm-svn: 242340

9 years agoMIR Serialization: Serialize references from the stack objects to named allocas.
Alex Lorenz [Wed, 15 Jul 2015 22:14:49 +0000 (22:14 +0000)]
MIR Serialization: Serialize references from the stack objects to named allocas.

This commit serializes the references to the named LLVM alloca instructions from
the stack objects in the machine frame info. This commit adds a field 'Name' to
the struct 'yaml::MachineStackObject'. This new field is used to store the name
of the alloca instruction when the alloca is present and when it has a name.

llvm-svn: 242339

9 years agoAdd a "debugger tuning" concept that allows us to fine-tune how we
Paul Robinson [Wed, 15 Jul 2015 22:04:54 +0000 (22:04 +0000)]
Add a "debugger tuning" concept that allows us to fine-tune how we
emit debug info, according to the preferences of the different
debuggers used on various targets.
Darwin and FreeBSD default to tuning for LLDB; PS4 defaults to tuning for
the SCE (Sony Computer Entertainment) debugger.  All others default to GDB.

Differential Revision: http://reviews.llvm.org/D8506

llvm-svn: 242338

9 years agoFix mergefunc infinite loop
JF Bastien [Wed, 15 Jul 2015 21:51:33 +0000 (21:51 +0000)]
Fix mergefunc infinite loop

Self-referential constants containing references to a merged function
no longer cause the MergeFunctions pass to infinite loop. Also adds a
reproduction IR which would otherwise fail, which was isolated from a similar
issue in Chromium.

Author: jrkoenig
Reviewers: nlewycky, jfb
Subscribers: llvm-commits, nlewycky, jfb

Differential Revision: http://reviews.llvm.org/D11208

llvm-svn: 242337

9 years agoSimplify a few uses of remove_filename by using parent_path instead.
Rafael Espindola [Wed, 15 Jul 2015 21:24:07 +0000 (21:24 +0000)]
Simplify a few uses of remove_filename by using parent_path instead.

llvm-svn: 242334

9 years agoRemove shell-specific code from TestLoadUnload Makefile.
Chaoren Lin [Wed, 15 Jul 2015 21:18:26 +0000 (21:18 +0000)]
Remove shell-specific code from TestLoadUnload Makefile.

Reviewers: clayborg, sivachandra

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D11202

llvm-svn: 242332

9 years agoSwitch the release script to build with CMake by default (PR21561)
Hans Wennborg [Wed, 15 Jul 2015 21:06:16 +0000 (21:06 +0000)]
Switch the release script to build with CMake by default (PR21561)

It retains the possibility to use the autoconf build with a
command-line option ('-use-autoconf'), and uses that by default on Darwin since
compiler-rt requires it on that platform.

This commit also removes the "Release-64" flavour and related logic. The script
would previously do two builds unless the '-no-64bit' flag was passed, but on
my machine and from those I asked this always ended up producing two 64-bit builds,
causing much confusion.

It also removes the -build-triple option, which caused the --build= flag to
get passed to ./configure. This was presumably intended for cross-compiling,
but none of the release testers use it. If someone does want to pass it,
they can use '-configure-flags --build=foo' instead.

Differential Revision: http://reviews.llvm.org/D10715

llvm-svn: 242331

9 years agoHandle the error of trying to convert a regular archive to a thin one.
Rafael Espindola [Wed, 15 Jul 2015 20:45:56 +0000 (20:45 +0000)]
Handle the error of trying to convert a regular archive to a thin one.

While at it, test that we can add to a thin archive.

llvm-svn: 242330

9 years agoFinally, with no users for shell-preserves-root, remove it from lit.cfg.
Yaron Keren [Wed, 15 Jul 2015 20:41:28 +0000 (20:41 +0000)]
Finally, with no users for shell-preserves-root, remove it from lit.cfg.

llvm-svn: 242329

9 years ago[Static Analyzer] Do not fail silently, when the analyzer is invoked from tooling...
Gabor Horvath [Wed, 15 Jul 2015 20:32:07 +0000 (20:32 +0000)]
[Static Analyzer] Do not fail silently, when the analyzer is invoked from tooling lib, an analyzer plugin is loaded, but the runtime linker fails to link.

llvm-svn: 242326

9 years agoErase REQUIRES: shell-preserves-root from remaining tests, see r242312.þ
Yaron Keren [Wed, 15 Jul 2015 20:04:18 +0000 (20:04 +0000)]
Erase REQUIRES: shell-preserves-root from remaining tests, see r242312.þ

llvm-svn: 242323

9 years agoRename doFunction() in BFI to calculate() and change its parameters from pointers...
Cong Hou [Wed, 15 Jul 2015 19:58:26 +0000 (19:58 +0000)]
Rename doFunction() in BFI to calculate() and change its parameters from pointers to references.

http://reviews.llvm.org/D11196

llvm-svn: 242322

9 years agoErase REQUIRES: shell-preserves-root from more tests, see r242312.
Yaron Keren [Wed, 15 Jul 2015 19:42:18 +0000 (19:42 +0000)]
Erase REQUIRES: shell-preserves-root from more tests, see r242312.

llvm-svn: 242321

9 years agoAnalyze recursive PHI nodes in BasicAA
Tobias Edler von Koch [Wed, 15 Jul 2015 19:32:22 +0000 (19:32 +0000)]
Analyze recursive PHI nodes in BasicAA

Summary:
This patch allows phi nodes like
  %x = phi [ %incptr, ... ] [ %var, ... ]
  %incptr = getelementptr %x, 1
to be analyzed by BasicAliasAnalysis.

In aliasPHI, we can detect incoming values that are recursive GEPs with a
constant offset. Instead of trying to analyze a recursive GEP (and failing),
we now ignore it and instead set the size of the memory referenced by
the PHINode to UnknownSize. This represents all the possible memory
locations the pointer represented by the PHINode could be advanced to
by the GEP.

For now, this new behavior is turned off by default to allow debugging of
performance degradations seen with SPEC/x86 and Hexagon benchmarks.
The flag -basicaa-recphi turns it on.

Reviewers: hfinkel, sanjoy

Subscribers: tobiasvk_caf, sanjoy, llvm-commits

Differential Revision: http://reviews.llvm.org/D10368

llvm-svn: 242320

9 years agoUse accept instead of accept4 for Android.
Chaoren Lin [Wed, 15 Jul 2015 19:22:12 +0000 (19:22 +0000)]
Use accept instead of accept4 for Android.

Summary:
The accept4 syscall is missing on older ARM Android kernels, and the accept()
call is implemented with the accept4 syscall, so we'll need to call the accept
syscall directly.

Reviewers: vharron, tberghammer, labath

Subscribers: ovyalov, chaoren, labath, tberghammer, aemerson, lldb-commits

Differential Revision: http://reviews.llvm.org/D10887

llvm-svn: 242319

9 years agoDefault to linking lldb-server statically for Android.
Chaoren Lin [Wed, 15 Jul 2015 19:22:09 +0000 (19:22 +0000)]
Default to linking lldb-server statically for Android.

Reviewers: vharron, tberghammer

Subscribers: chaoren, labath, tberghammer, lldb-commits

Differential Revision: http://reviews.llvm.org/D10858

llvm-svn: 242318

9 years agoAllow any comment to be a trailing comment when -fparse-all-comments is on.
James Dennett [Wed, 15 Jul 2015 19:13:39 +0000 (19:13 +0000)]
Allow any comment to be a trailing comment when -fparse-all-comments is on.

This helps with freeform documentation styles, where otherwise code like
  enum class E {
    E1,  // D1
    E2   // D2
  };
would result in D1 being associated with E2. To properly associate E1
with D1 and E2 with D2, this patch allows all raw comments C such that
C.isParseAllComments() to participate in trailing comment checks inside
getRawCommentForDeclNoCache. This takes care of linking the intended
documentation with the intended decls. There remains an issue with code
like:
  foo();  // DN
  int x;
To prevent DN from being associated with x, this patch adds a new test
on preceding-line comments C (where C.isParseAllComments() and also
C's kind is RCK_OrdinaryBCPL or RCK_OrdinaryC) that checks whether C
is the first non-whitespace thing on C's starting line.

Patch from Luke Zarko <zarko@google.com>, D11069 reviewed by rsmith.

llvm-svn: 242317

9 years agoclang-format: Fix return type breaking with overloaded operator functions
Birunthan Mohanathas [Wed, 15 Jul 2015 19:11:58 +0000 (19:11 +0000)]
clang-format: Fix return type breaking with overloaded operator functions

Differential Revision: http://reviews.llvm.org/D11177

llvm-svn: 242316

9 years ago-disable-llvm-optzns in one clang test.
Evgeniy Stepanov [Wed, 15 Jul 2015 18:57:57 +0000 (18:57 +0000)]
-disable-llvm-optzns in one clang test.

The intent is to test Clang codegen at -O1, and not the LLVM
optimization pipeline.

llvm-svn: 242315

9 years agoActually requiring shell disables the test on Windows whereas
Yaron Keren [Wed, 15 Jul 2015 18:55:39 +0000 (18:55 +0000)]
Actually requiring shell disables the test on Windows whereas
previously requiring shell-preserves-root did not, so do not
require anything.

llvm-svn: 242314

9 years ago[PPC64] Update tests for vec_sld
Bill Schmidt [Wed, 15 Jul 2015 18:55:02 +0000 (18:55 +0000)]
[PPC64] Update tests for vec_sld

Revision 224297 modified the behavior of vec_sld for little endian so
that LLVM will generate the correct corresponding vsldoi instruction.
I neglected to update the existing tests, which continued to pass
because they were not specific enough.  This patch adds enough
specificity to the tests to make them useful for BE and LE testing of
vec_sld.

llvm-svn: 242313

9 years agoSince r179283, internal shell is default on windows and so shell-preserves-root
Yaron Keren [Wed, 15 Jul 2015 18:40:05 +0000 (18:40 +0000)]
Since r179283, internal shell is default on windows and so shell-preserves-root
is true on MSYS bash although this requires: used to disable tests on MSYS bash.

Nevertheless, all tests requiring shell-preserves-root do pass except for
Driver/darwin-sdkroot.c. It will require a patch, either by disabling it on
Windows or by fixing shell-preserves-root to really be true only on MSYS
and making darwin-sdkroot.c its only user.

In any case, all other tests requiring shell-preserves-root do not really require
it so I'm replacing REQUIRES: shell-preserves-root with REQUIRES: shell in two
tests first.

llvm-svn: 242312

9 years agoRevert "Refactor optimizeUncoalescable logic"
Bruno Cardoso Lopes [Wed, 15 Jul 2015 18:10:46 +0000 (18:10 +0000)]
Revert "Refactor optimizeUncoalescable logic"

Likely broke compilation on ARM:

http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/13054

This reverts commit 0b7824464fbe3d3f386e2d4aef6a431422709e53.

llvm-svn: 242311

9 years agoRevert "Look through PHIs to find additional register sources"
Bruno Cardoso Lopes [Wed, 15 Jul 2015 18:10:35 +0000 (18:10 +0000)]
Revert "Look through PHIs to find additional register sources"

Likely broke compilation on ARM:

http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/13054

This reverts commit 131ce4a838c081516cbfed039fc986b33e3979d6.

llvm-svn: 242310

9 years agoRun clang-format on Tools.h, the indentation is inconsistent
Reid Kleckner [Wed, 15 Jul 2015 17:58:55 +0000 (17:58 +0000)]
Run clang-format on Tools.h, the indentation is inconsistent

llvm-svn: 242309

9 years agoTest commit.
Cong Hou [Wed, 15 Jul 2015 17:58:15 +0000 (17:58 +0000)]
Test commit.

This is a test commit (one blank line deleted).

llvm-svn: 242308

9 years ago[Targets] Define __BOOL_DEFINED for Windows targets in C++ mode
David Majnemer [Wed, 15 Jul 2015 17:32:34 +0000 (17:32 +0000)]
[Targets] Define __BOOL_DEFINED for Windows targets in C++ mode

MSVC 4.2 didn't have bool as a builtin type but MSVC 5.0 does.  When
they added it, they added a macro (__BOOL_DEFINED) which allows build
scripts and the like to know if they should provide their own bool.

Clang always supports bool as a builtin type in C++ mode.

llvm-svn: 242307

9 years agoFix -data-info-line when source includes column number.
Dawn Perchik [Wed, 15 Jul 2015 17:25:01 +0000 (17:25 +0000)]
Fix -data-info-line when source includes column number.

This fixes an off-by-one bug in CMICmdCmdDataInfoLine::Acknowledge.  Given:
    LineEntry: \[0x0000000100000f37-0x0000000100000f45\): /path/to/file:123:1
-data-info-line would report the line as 12, omitting the last digit.

Reviewed by: ki.stfu, abidh
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11209

llvm-svn: 242306

9 years ago[NativeProcessLinux] Integrate MainLoop
Pavel Labath [Wed, 15 Jul 2015 17:20:01 +0000 (17:20 +0000)]
[NativeProcessLinux] Integrate MainLoop

Summary:
This commit integrates MainLoop into NativeProcessLinux. By registering a SIGCHLD handler with
the llgs main loop, we can get rid of the special monitor thread in NPL, which saves as a lot of
thread ping-pong when responding to client requests (e.g. qThreadInfo processing time has been
reduced by about 40%). It also makes the code simpler, IMHO.

Reviewers: ovyalov, clayborg, tberghammer, chaoren

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D11150

llvm-svn: 242305

9 years agoDelete declared but not implemented functions.
Rafael Espindola [Wed, 15 Jul 2015 17:19:39 +0000 (17:19 +0000)]
Delete declared but not implemented functions.

llvm-svn: 242304

9 years agoAdd the ability to AST match a variable declaration that is an exception variable.
Aaron Ballman [Wed, 15 Jul 2015 17:11:21 +0000 (17:11 +0000)]
Add the ability to AST match a variable declaration that is an exception variable.

llvm-svn: 242303

9 years agoDebug Info: Add basic support for external types references.
Adrian Prantl [Wed, 15 Jul 2015 17:01:41 +0000 (17:01 +0000)]
Debug Info: Add basic support for external types references.
This is a necessary prerequisite for bootstrapping the emission
of debug info inside modules.

- Adds a FlagExternalTypeRef to DICompositeType.
  External types must have a unique identifier.
- External type references are emitted using a forward declaration
  with a DW_AT_signature([DW_FORM_ref_sig8]) based on the UID.

http://reviews.llvm.org/D9612

llvm-svn: 242302

9 years agoRe-indent the CMake refactor to two-space indention
Jonathan Peyton [Wed, 15 Jul 2015 16:57:19 +0000 (16:57 +0000)]
Re-indent the CMake refactor to two-space indention

I apologize for this nasty commit, but I somehow overlooked Chandler's
comment to re-indent these files to two space indention.  I know this
is a horrible commit, but I figured if it was done quickly after the
first one, not too many conflicts would arise.

Again, I'm sorry and won't do this again.

llvm-svn: 242301

9 years agoAdd missing load/store flags to thumb2 instructions.
Pete Cooper [Wed, 15 Jul 2015 16:36:38 +0000 (16:36 +0000)]
Add missing load/store flags to thumb2 instructions.

These were the cause of a verifier error when building 7zip with
-verify-machineinstrs.  Running 'make check' with the verifier
triggered the same error on the test here so i've updated the test
to run the verifier on one of its runs instead of adding a new one.

While looking at this code, there was a stale comment that these
instructions were only used for disassembly.  This probably used to
be the case, but they are now used in the 'ARM load / store optimization pass' too.

llvm-svn: 242300

9 years agoclang-format: Fix column layout with a comment in the last line.
Daniel Jasper [Wed, 15 Jul 2015 16:26:47 +0000 (16:26 +0000)]
clang-format: Fix column layout with a comment in the last line.

Before:
  int aaaaa[] = {
      1, 2,
      3, // comment
      4, 5,
      6  // comment
  };

After:
  int aaaaa[] = {
      1, 2, 3, // comment
      4, 5, 6  // comment
  };

llvm-svn: 242299

9 years agoLarge Refactor of CMake build system
Jonathan Peyton [Wed, 15 Jul 2015 16:05:30 +0000 (16:05 +0000)]
Large Refactor of CMake build system

This commit improves numerous functionalities of the OpenMP CMake build
system to be more conducive with LLVM's build system and build philosophies.
The CMake build system, as it was before this commit, was not up to LLVM's
standards and did not implement the configuration stage like most CMake based
build systems offer (check for compiler flags, libraries, etc.) In order to
improve it dramatically in a short period of time, a large refactoring had
to be done.
The main changes done with this commit are as follows:

* Compiler flag checks - The flags are no longer grabbed from compiler specific
  directories.  They are checked for availability in config-ix.cmake and added
  accordingly inside LibompHandleFlags.cmake.
* Feature checks were added in config-ix.cmake.  For example, the standard CMake
  module FindThreads is probed for the threading model to use inside the OpenMP
  library.
* OS detection - There is no longer a LIBOMP_OS variable, OS-specifc build logic
  is wrapped around the WIN32 and APPLE macros with !(WIN32 OR APPLE) meaning
  a Unix flavor of some sort.
* Got rid of vestigial functions/macros/variables
* Added new libomp_append() function which is used everywhere to conditionally
  or undconditionally append to a list
* All targets have the libomp prefix so as not to interfere with any other
  project
* LibompCheckLinkerFlag.cmake module was added which checks for linker flags
  specifically for building shared libraries.
* LibompCheckFortranFlag.cmake module was added which checks for fortran flag
  availability.
* Removed most of the cruft from the translation between the perl+Makefile based
  build system and this one.  The remaining components that they share are
  perl scripts which I'm in the process of removing.

There is still more left to do.  The perl scripts still need to be removed, and
a config.h.in file (or similarly named) needs to be added with #cmakedefine lines
in it.  But this is a much better first step than the previous system.

Differential Revision: http://reviews.llvm.org/D10656

llvm-svn: 242298

9 years ago[PPC64LE] Fix vec_sld semantics for little endian
Bill Schmidt [Wed, 15 Jul 2015 15:45:53 +0000 (15:45 +0000)]
[PPC64LE] Fix vec_sld semantics for little endian

The vec_sld interface provides access to the vsldoi instruction.
Unlike most of the vec_* interfaces, we do not attempt to change the
generated code for vec_sld based on the endian mode.  It is too
difficult to correctly infer the desired semantics because of
different element types, and the corrected instruction sequence is
expensive, involving loading a permute control vector and performing a
generalized permute.

For GCC, this was implemented as "Don't touch the vec_sld"
implementation.  When it came time for the LLVM implementation, I did
the same thing.  However, this was hasty and incorrect.  In LLVM's
version of altivec.h, vec_sld was previously defined in terms of the
vec_perm interface.  Because vec_perm semantics are adjusted for
little endian, this means that leaving vec_sld untouched causes it to
generate something different for LE than for BE.  Not good.

This patch adjusts the form of vec_perm that is used for vec_sld and
vec_vsldoi, effectively undoing the modifications so that the same
vsldoi instruction will be generated for both BE and LE.

There is an accompanying back-end patch to take care of some small
ripple effects caused by these changes.

llvm-svn: 242297

9 years ago[PPC64LE] Fix vec_sld semantics for little endian
Bill Schmidt [Wed, 15 Jul 2015 15:45:30 +0000 (15:45 +0000)]
[PPC64LE] Fix vec_sld semantics for little endian

The vec_sld interface provides access to the vsldoi instruction.
Unlike most of the vec_* interfaces, we do not attempt to change the
generated code for vec_sld based on the endian mode.  It is too
difficult to correctly infer the desired semantics because of
different element types, and the corrected instruction sequence is
expensive, involving loading a permute control vector and performing a
generalized permute.

For GCC, this was implemented as "Don't touch the vec_sld"
implementation.  When it came time for the LLVM implementation, I did
the same thing.  However, this was hasty and incorrect.  In LLVM's
version of altivec.h, vec_sld was previously defined in terms of the
vec_perm interface.  Because vec_perm semantics are adjusted for
little endian, this means that leaving vec_sld untouched causes it to
generate something different for LE than for BE.  Not good.

This back-end patch accompanies the changes to altivec.h that change
vec_sld's behavior for little endian.  Those changes mean that we see
slightly different code in the back end when trying to recognize a
VSLDOI instruction in isVSLDOIShuffleMask.  In particular, a
ShuffleKind of 1 (where the two inputs are identical) must now be
treated the same way as a ShuffleKind of 2 (little endian with
different inputs) when little endian mode is in force.  This is
because ShuffleKind of 1 is defined using big-endian numbering.

This has a ripple effect on LowerBUILD_VECTOR, where we create our own
internal VSLDOI instructions.  Because these are a ShuffleKind of 1,
they will now have their shift amounts subtracted from 16 when
recognizing the shuffle mask.  To avoid problems we have to subtract
them from 16 again before creating the VSLDOI instructions.

There are a couple of other uses of BuildVSLDOI, but these do not need
to be modified because the shift amount is 8, which is unchanged when
subtracted from 16.

llvm-svn: 242296

9 years agoLook through PHIs to find additional register sources
Bruno Cardoso Lopes [Wed, 15 Jul 2015 15:35:23 +0000 (15:35 +0000)]
Look through PHIs to find additional register sources

- Teaches the ValueTracker in the PeepholeOptimizer to look through PHI
instructions.
- Add findNextSourceAndRewritePHI method to lookup into multiple sources
returnted by the ValueTracker and rewrite PHIs with new sources.

With these changes we can find more register sources and rewrite more
copies to allow coaslescing of bitcast instructions. Hence, we eliminate
unnecessary VR64 <-> GR64 copies in x86, but it could be extended to
other archs by marking "isBitcast" on target specific instructions. The
x86 example follows:

A:
  psllq %mm1, %mm0
  movd  %mm0, %r9
  jmp C

B:
  por %mm1, %mm0
  movd  %mm0, %r9
  jmp C

C:
  movd  %r9, %mm0
  pshufw  $238, %mm0, %mm0

Becomes:

A:
  psllq %mm1, %mm0
  jmp C

B:
  por %mm1, %mm0
  jmp C

C:
  pshufw  $238, %mm0, %mm0

Differential Revision: http://reviews.llvm.org/D11197

rdar://problem/20404526

llvm-svn: 242295

9 years agoRefactor optimizeUncoalescable logic
Bruno Cardoso Lopes [Wed, 15 Jul 2015 15:35:09 +0000 (15:35 +0000)]
Refactor optimizeUncoalescable logic

- Create a new CopyRewriter for Uncoalescable copy-like instructions
- Change the ValueTracker to return a ValueTrackerResult

This makes optimizeUncoalescable looks more like optimizeCoalescable and
use the CopyRewritter infrastructure.

This is also the preparation for looking up into PHI nodes in the
ValueTracker.

Differential Revision: http://reviews.llvm.org/D11195

llvm-svn: 242294

9 years agoSet comdat when an available_externally thunk is converted to linkonce_odr.
Rafael Espindola [Wed, 15 Jul 2015 14:48:06 +0000 (14:48 +0000)]
Set comdat when an available_externally thunk is converted to linkonce_odr.

Fixes pr24130.

llvm-svn: 242293

9 years agoAdd support for armv7-windows-gnu targets to the clang front end.
Yaron Keren [Wed, 15 Jul 2015 13:32:23 +0000 (13:32 +0000)]
Add support for armv7-windows-gnu targets to the clang front end.

http://reviews.llvm.org/D11071

Patch by Martell Malone
Reviewed by Reid Kleckner

llvm-svn: 242292

9 years ago[llgo] update libgo-llgo.so version to match libtool_VERSION
Andrew Wilkins [Wed, 15 Jul 2015 13:17:04 +0000 (13:17 +0000)]
[llgo] update libgo-llgo.so version to match libtool_VERSION

Summary:
libtool_VERSION was changed in gofrontend a while ago,
but CMakeLists.txt in llgo wasn't updated, and so the
install target fails. Not sure how this went unnoticed
for so long.

Reviewers: pcc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11118

llvm-svn: 242291

9 years ago[llgo] set function personality with SetPersonality
Andrew Wilkins [Wed, 15 Jul 2015 13:05:35 +0000 (13:05 +0000)]
[llgo] set function personality with SetPersonality

Summary:
If a function requires a landing pad, set the personality function.

Requires D11116.

Reviewers: pcc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11117

llvm-svn: 242290

9 years agoExpose setPersonalityFn to Go
Andrew Wilkins [Wed, 15 Jul 2015 13:03:08 +0000 (13:03 +0000)]
Expose setPersonalityFn to Go

Summary:
Add Value.SetPersonality to the Go bindings. The Go
bindings' Builder.CreateLandingPad has been updated,
removing the obsolete personality argument.

Background

The personality attribute was removed from LandingPadInst
in r239940, and llvm::Function::setPersonalityFn introduced.

There was no corresponding change to either the C API or
Go bindings. The Go bindings were broken until r239940, but
that change was just to ignore the personality argument.
This broke llgo.

Reviewers: majnemer, pcc

Subscribers: deadalnix, llvm-commits, axw

Differential Revision: http://reviews.llvm.org/D11116

llvm-svn: 242289

9 years ago[PPC] Disassemble little endian ppc instructions in the right byte order
Benjamin Kramer [Wed, 15 Jul 2015 12:56:19 +0000 (12:56 +0000)]
[PPC] Disassemble little endian ppc instructions in the right byte order

PR24122. The test is simply a byte swapped version of ppc64-encoding.txt.

llvm-svn: 242288

9 years agoCFI: Add a default blacklist.
Peter Collingbourne [Wed, 15 Jul 2015 12:16:25 +0000 (12:16 +0000)]
CFI: Add a default blacklist.

Differential Revision: http://reviews.llvm.org/D11095

llvm-svn: 242287

9 years agoCodeGen: Improve CFI type blacklisting mechanism.
Peter Collingbourne [Wed, 15 Jul 2015 12:15:56 +0000 (12:15 +0000)]
CodeGen: Improve CFI type blacklisting mechanism.

We now use the sanitizer special case list to decide which types to blacklist.
We also support a special blacklist entry for types with a uuid attribute,
which are generally COM types whose virtual tables are defined externally.

Differential Revision: http://reviews.llvm.org/D11096

llvm-svn: 242286

9 years ago[OPENMP] http://llvm.org/PR24121: canonical loop rejected when comparison has implici...
Alexey Bataev [Wed, 15 Jul 2015 12:14:07 +0000 (12:14 +0000)]
[OPENMP] llvm.org/PR24121: canonical loop rejected when comparison has implicit conversions or destruction

Allow to use complex iterators expressions in loops for C++.

llvm-svn: 242285

9 years ago-Added API for retrieving the default FPU of a CPU from TargetParser.
Alexandros Lamprineas [Wed, 15 Jul 2015 10:46:21 +0000 (10:46 +0000)]
-Added API for retrieving the default FPU of a CPU from TargetParser.
-Implemented as a table lookup.

Change-Id: Iaad0eaf4b29b06827e6700269496dc1ba20e9018
Phabricator: http://reviews.llvm.org/D11100
llvm-svn: 242284

9 years agoFix test to run under MSYS2 by disabling MSYS conversion of /C /TP /TC.
Yaron Keren [Wed, 15 Jul 2015 10:45:25 +0000 (10:45 +0000)]
Fix test to run under MSYS2 by disabling MSYS conversion of /C /TP /TC.

Thanks to Alexpux.

llvm-svn: 242283

9 years agoUpdate test comment that it fails the same way on MSYS2.
Yaron Keren [Wed, 15 Jul 2015 09:41:04 +0000 (09:41 +0000)]
Update test comment that it fails the same way on MSYS2.

llvm-svn: 242282

9 years ago[PM/AA] Fix *numerous* serious bugs in GlobalsModRef found by
Chandler Carruth [Wed, 15 Jul 2015 08:53:29 +0000 (08:53 +0000)]
[PM/AA] Fix *numerous* serious bugs in GlobalsModRef found by
inspection.

While we want to handle calls specially in this code because they should
have been modeled by the call graph analysis that precedes it, we should
*not* be re-implementing the predicates for whether an instruction reads
or writes memory. Those are well defined already. Notably, at least the
following issues seem to be clearly missed before:
- Ordered atomic loads can "write" to memory by causing writes from other
  threads to become visible. Similarly for ordered atomic stores.
- AtomicRMW instructions quite obviously both read and write to memory.
- AtomicCmpXchg instructions also read and write to memory.
- Fences read and write to memory.
- Invokes of intrinsics or memory allocation functions.

I don't have any test cases, and I suspect this has never really come up
in the real world. But there is no reason why it wouldn't, and it makes
the code simpler to do this the right way.

While here, I've tried to make the loops significantly simpler as well
and added helpful comments as to what is going on.

llvm-svn: 242281

9 years ago[SDAG] Optimize unordered comparison in soft-float mode (patch by Anton Nadolskiy)
Alexey Bataev [Wed, 15 Jul 2015 08:39:35 +0000 (08:39 +0000)]
[SDAG] Optimize unordered comparison in soft-float mode (patch by Anton Nadolskiy)

Current implementation handles unordered comparison poorly in soft-float mode.
Consider (a ULE b) which is a <= b. It is lowered to (ledf2(a, b) <= 0 || unorddf2(a, b) != 0) (in general). We can do better job by lowering it to (__gtdf2(a, b) <= 0).
Such replacement is true for other CMP's (ult, ugt, uge). In general, we just call same function as for ordered case but negate comparison against zero.
Differential Revision: http://reviews.llvm.org/D10804

llvm-svn: 242280

9 years ago[PowerPC] Use the MachineCombiner to reassociate fadd/fmul
Hal Finkel [Wed, 15 Jul 2015 08:23:05 +0000 (08:23 +0000)]
[PowerPC] Use the MachineCombiner to reassociate fadd/fmul

This is a direct port of the code from the X86 backend (r239486/r240361), which
uses the MachineCombiner to reassociate (floating-point) adds/muls to increase
ILP, to the PowerPC backend. The rationale is the same.

There is a lot of copy-and-paste here between the X86 code and the PowerPC
code, and we should extract at least some of this into CodeGen somewhere.
However, I don't want to do that until this code is enhanced to handle FMAs as
well. After that, we'll be in a better position to extract the common parts.

llvm-svn: 242279

9 years ago[PowerPC] Extend physical register live range in PPCVSXFMAMutate
Hal Finkel [Wed, 15 Jul 2015 08:23:03 +0000 (08:23 +0000)]
[PowerPC] Extend physical register live range in PPCVSXFMAMutate

If the source of the copy that defines the addend is a physical register, then
its existing live range may not extend to the FMA being mutated. Make sure we
extend the live range of the register to meet the FMA because it will become
its operand in this case.

I don't have an independent test case, but it will be exposed by change to be
committed shortly enabling the use of the machine combiner to do fadd/fmul
reassociation, and will be covered by one of the associated regression tests.

llvm-svn: 242278

9 years ago[MachineCombiner] Work with itineraries
Hal Finkel [Wed, 15 Jul 2015 08:22:23 +0000 (08:22 +0000)]
[MachineCombiner] Work with itineraries

MachineCombiner predicated its use of scheduling-based metrics on
hasInstrSchedModel(), but useful conclusions can be drawn from pipeline
itineraries as well. Almost all of the logic (except for resource tracking in
preservesResourceLen) can be used if we have an itinerary, so enable it in that
case as well.

This will be used by the PowerPC backend in an upcoming commit.

llvm-svn: 242277

9 years ago[AArch64] Fix problems in decoding generic MSR instructions
Petr Pavlu [Wed, 15 Jul 2015 08:10:30 +0000 (08:10 +0000)]
[AArch64] Fix problems in decoding generic MSR instructions

Bitpatterns rejected by the decoder method of `MSR (immediate)` should be
decoded as the `extended MSR (register)` instruction.

Differential Revision: http://reviews.llvm.org/D7174

llvm-svn: 242276

9 years ago[PM/AA] Cleanup some loops to be range-based. NFC.
Chandler Carruth [Wed, 15 Jul 2015 08:09:23 +0000 (08:09 +0000)]
[PM/AA] Cleanup some loops to be range-based. NFC.

llvm-svn: 242275

9 years ago[TableGen] Improve decoding options for non-orthogonal instructions
Petr Pavlu [Wed, 15 Jul 2015 08:04:27 +0000 (08:04 +0000)]
[TableGen] Improve decoding options for non-orthogonal instructions

When FixedLenDecoder matches an input bitpattern of form [01]+ with an
instruction bitpattern of form [01?]+ (where 0/1 are static bits and ? are
mixed/variable bits) it passes the input bitpattern to a specific instruction
decoder method which then makes a final decision whether the bitpattern is a
valid instruction or not. This means the decoder must handle all possible
values of the variable bits which sometimes leads to opcode rewrites in the
decoder method when the instructions are not fully orthogonal.

The patch provides a way for the decoder method to say that when it returns
Fail it does not necessarily mean the bitpattern is invalid, but rather that
the bitpattern is definitely not an instruction that is recognized by the
decoder method. The decoder can then try to match the input bitpattern with
other possible instruction bitpatterns.

For example, this allows to solve a situation on AArch64 where the `MSR
(immediate)` instruction has form:
1101 0101 0000 0??? 0100 ???? ???1 1111
but not all values of the ? bits are allowed. The rejected values should be
handled by the `extended MSR (register)` instruction:
1101 0101 000? ???? ???? ???? ???? ????

The decoder will first try to decode an input bitpattern that matches both
bitpatterns as `MSR (immediate)` but currently this puts the decoder method of
`MSR (immediate)` into a situation when it must be able to decode all possible
values of the ? bits, i.e. it would need to rewrite the instruction to `MSR
(register)` when it is not `MSR (immediate)`.

The patch allows to specify that the decoder method cannot determine if the
instruction is valid for all variable values. The decoder method can simply
return Fail when it knows it is definitely not `MSR (immediate)`. The decoder
will then backtrack the decoding and find that it can match the input
bitpattern with the more generic `MSR (register)` bitpattern too.

Differential Revision: http://reviews.llvm.org/D7174

llvm-svn: 242274

9 years ago[X86][SSE] Added i686/SSE2 vector shift tests.
Simon Pilgrim [Wed, 15 Jul 2015 08:04:07 +0000 (08:04 +0000)]
[X86][SSE] Added i686/SSE2 vector shift tests.

We were only testing on x86-64, but we should be ensuring decent code gen of i64 shifts on 32-bit targets.

llvm-svn: 242273

9 years agoFix comments for several methods, NFC
Alexey Bataev [Wed, 15 Jul 2015 07:53:08 +0000 (07:53 +0000)]
Fix comments for several methods, NFC

llvm-svn: 242272

9 years agoRemove extra \brief comment, NFC
Alexey Bataev [Wed, 15 Jul 2015 07:48:02 +0000 (07:48 +0000)]
Remove extra \brief comment, NFC

llvm-svn: 242271

9 years agoAVX : Fix ISA disabling in case AVX512VL , some instructions should be disabled only...
Igor Breger [Wed, 15 Jul 2015 07:08:10 +0000 (07:08 +0000)]
AVX : Fix ISA disabling in case AVX512VL , some instructions should be disabled only if AVX512BW present.
Tests added.

Differential Revision: http://reviews.llvm.org/D11122

llvm-svn: 242270

9 years agoInitial support for writing thin archives.
Rafael Espindola [Wed, 15 Jul 2015 05:47:46 +0000 (05:47 +0000)]
Initial support for writing thin archives.

llvm-svn: 242269

9 years agoTidy-up test case from r242257.
Michael Zolotukhin [Wed, 15 Jul 2015 01:51:51 +0000 (01:51 +0000)]
Tidy-up test case from r242257.

llvm-svn: 242268

9 years ago[vim] Update the syntax to mark REQUIRES lines and not talk about
Chandler Carruth [Wed, 15 Jul 2015 01:48:40 +0000 (01:48 +0000)]
[vim] Update the syntax to mark REQUIRES lines and not talk about
dejagnu.

I wonder if it would be useful to handle FileCheck prefixes specially?
Especially if we could get some error checking. Suggestions welcome.
Patches more welcome as I have no idea what I'm doing with vim
script....

llvm-svn: 242267

9 years ago[vim] Add the IR's comment prefix to the comments list. This allows vim
Chandler Carruth [Wed, 15 Jul 2015 01:36:50 +0000 (01:36 +0000)]
[vim] Add the IR's comment prefix to the comments list. This allows vim
to intelligently wrap prose written in IR comment blocks. This has
bothered me for roughly ever, and my fellow IRC denziens convinced me to
fix it.

llvm-svn: 242266

9 years agoUse enum instead of unsigned. NFC.
Pete Cooper [Wed, 15 Jul 2015 01:31:26 +0000 (01:31 +0000)]
Use enum instead of unsigned.  NFC.

The unsigned opcode argument here was the result of BinaryOperator->getOpcode().
That returns a BinaryOps enum which is more accurate than passing around an
unsigned.

llvm-svn: 242265

9 years agoUse cast<> instead of dyn_cast to remove llvm_unreachable. NFC.
Pete Cooper [Wed, 15 Jul 2015 01:31:23 +0000 (01:31 +0000)]
Use cast<> instead of dyn_cast to remove llvm_unreachable.  NFC.

This code was checking if we are an ICmpInst or FCmpInst then throwing
unreachable if we are neither.  We must be one or the other, so use a
cast on the FCmpInst case to ensure that we are that case.  Then we can
avoid having an unreachable but still catch an error if we ever had another
subclass of CmpInst.

llvm-svn: 242264

9 years agoUse another foreach loop. NFC
Pete Cooper [Wed, 15 Jul 2015 01:31:20 +0000 (01:31 +0000)]
Use another foreach loop.  NFC

llvm-svn: 242263

9 years agoFix another little nit with detach and keep stopped, you have to check
Jim Ingham [Wed, 15 Jul 2015 00:59:25 +0000 (00:59 +0000)]
Fix another little nit with detach and keep stopped, you have to check
both for packet success and that the response is OK.

llvm-svn: 242262

9 years agoUse getAnyExtOrTrunc helper instead of manually doing ext/trunc check. NFC.
Pete Cooper [Wed, 15 Jul 2015 00:43:57 +0000 (00:43 +0000)]
Use getAnyExtOrTrunc helper instead of manually doing ext/trunc check.  NFC.

The code here was doing exactly what is already in getAnyExtOrTrunc().
Just use that method instead.

llvm-svn: 242261

9 years agoUse getZExtOrTrunc helper instead of manually doing zext/trunc check. NFC.
Pete Cooper [Wed, 15 Jul 2015 00:43:54 +0000 (00:43 +0000)]
Use getZExtOrTrunc helper instead of manually doing zext/trunc check.  NFC.

The code here was doing exactly what is already in getZExtOrTrunc().
Just use that method instead.

llvm-svn: 242260

9 years agoCOFF: Fix base relocations for __imp_ symbols on x86.
Rui Ueyama [Wed, 15 Jul 2015 00:25:38 +0000 (00:25 +0000)]
COFF: Fix base relocations for __imp_ symbols on x86.

Because thunks for dllimported symbols contain absolute addresses on x86,
they need to be relocated at load-time. This bug was a cause of crashes
in DLL initialization routines.

llvm-svn: 242259

9 years agoDocumentation cleanup, mostly fixing summaries. No functional change intended.
James Dennett [Wed, 15 Jul 2015 00:22:41 +0000 (00:22 +0000)]
Documentation cleanup, mostly fixing summaries.  No functional change intended.

llvm-svn: 242258

9 years ago[LoopUnrolling] Handle cast instructions.
Michael Zolotukhin [Wed, 15 Jul 2015 00:19:51 +0000 (00:19 +0000)]
[LoopUnrolling] Handle cast instructions.

During estimation of unrolling effect we should be able to propagate
constants through casts.

Differential Revision: http://reviews.llvm.org/D10207

llvm-svn: 242257

9 years agoCorrect length of packet that GDBRemoteCommunicationClient::Detach
Jason Molenda [Wed, 15 Jul 2015 00:16:09 +0000 (00:16 +0000)]
Correct length of packet that GDBRemoteCommunicationClient::Detach
should send when detaching and leaving the remote process/system
halted.  Previously only the 'D' initial char was sent, which
resumed the process like a normal detach.

llvm-svn: 242256

9 years agoChange conditional to assert. NFC.
Pete Cooper [Wed, 15 Jul 2015 00:07:57 +0000 (00:07 +0000)]
Change conditional to assert.  NFC.

This code was breaking from the case statement if the getStoreSizeInBits()
value was not a multiple of 0.  Given that the implementation returns
getStoreSize() * 8, it can only be a multiple of 8.

llvm-svn: 242255

9 years agoUse getStoreSize() instead of getStoreSizeInBits()/8. NFC.
Pete Cooper [Wed, 15 Jul 2015 00:07:55 +0000 (00:07 +0000)]
Use getStoreSize() instead of getStoreSizeInBits()/8.  NFC.

The calls here were both to getStoreSizeInBits() which multiplies by 8.
We then immediately divided by 8.  Calling getStoreSize() returns the
values we need without the extra arithmetic.

llvm-svn: 242254

9 years ago[modules] Switch to the normal reverse postorder visitation algorithm when computing...
Richard Smith [Wed, 15 Jul 2015 00:02:40 +0000 (00:02 +0000)]
[modules] Switch to the normal reverse postorder visitation algorithm when computing redeclaration chains.

llvm-svn: 242253

9 years agoUse a range loop.
Rafael Espindola [Tue, 14 Jul 2015 23:51:01 +0000 (23:51 +0000)]
Use a range loop.

llvm-svn: 242250