History log of /freebsd-9.3-release/contrib/llvm/lib/
Revision Date Author Comments
267654 20-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


266759 27-May-2014 dim

MFC r265925:

Upgrade our copy of llvm/clang to 3.4.1 release. This release contains
mostly fixes, for the following upstream bugs:

http://llvm.org/PR16365 http://llvm.org/PR17473 http://llvm.org/PR18000
http://llvm.org/PR18068 http://llvm.org/PR18102 http://llvm.org/PR18165
http://llvm.org/PR18260 http://llvm.org/PR18290 http://llvm.org/PR18316
http://llvm.org/PR18460 http://llvm.org/PR18473 http://llvm.org/PR18515
http://llvm.org/PR18526 http://llvm.org/PR18600 http://llvm.org/PR18762
http://llvm.org/PR18773 http://llvm.org/PR18860 http://llvm.org/PR18994
http://llvm.org/PR19007 http://llvm.org/PR19010 http://llvm.org/PR19033
http://llvm.org/PR19059 http://llvm.org/PR19144 http://llvm.org/PR19326

Approved by: re (kib)


263765 26-Mar-2014 dim

MFC r263312:

Pull in r196939 from upstream llvm trunk (by Reid Kleckner):

Reland "Fix miscompile of MS inline assembly with stack realignment"

This re-lands commit r196876, which was reverted in r196879.

The tests have been fixed to pass on platforms with a stack alignment
larger than 4.

Update to clang side tests will land shortly.

Pull in r196986 from upstream llvm trunk (by Reid Kleckner):

Revert the backend fatal error from r196939

The combination of inline asm, stack realignment, and dynamic allocas
turns out to be too common to reject out of hand.

ASan inserts empy inline asm fragments and uses aligned allocas.
Compiling any trivial function containing a dynamic alloca with ASan is
enough to trigger the check.

XFAIL the test cases that would be miscompiled and add one that uses the
relevant functionality.

Pull in r202930 from upstream llvm trunk (by Hans Wennborg):

Check for dynamic allocas and inline asm that clobbers sp before building
selection dag (PR19012)

In X86SelectionDagInfo::EmitTargetCodeForMemcpy we check with MachineFrameInfo
to make sure that ESI isn't used as a base pointer register before we choose to
emit rep movs (which clobbers esi).

The problem is that MachineFrameInfo wouldn't know about dynamic allocas or
inline asm that clobbers the stack pointer until SelectionDAGBuilder has
encountered them.

This patch fixes the problem by checking for such things when building the
FunctionLoweringInfo.

Differential Revision: http://llvm-reviews.chandlerc.com/D2954

Together, these commits fix the problem encountered in the devel/emacs
port on the i386 architecture, where a combination of stack realignment,
alloca() and memcpy() could incidentally clobber the %esi register,
leading to segfaults in the temacs build-time utility.

See also: http://llvm.org/PR18171 and http://llvm.org/PR19012

Reported by: ashish
PR: ports/183064

MFC r263313:

Pull in r203311 from upstream llvm trunk (by Arnold Schwaighofer):

ISel: Make VSELECT selection terminate in cases where the condition type has to
be split and the result type widened.

When the condition of a vselect has to be split it makes no sense widening the
vselect and thereby widening the condition. We end up in an endless loop of
widening (vselect result type) and splitting (condition mask type) doing this.
Instead, split both the condition and the vselect and widen the result.

I ran this over the test suite with i686 and mattr=+sse and saw no regressions.

Fixes PR18036.

With this fix the original problem case from the graphics/rawtherapee
port (posted in http://llvm.org/PR18036 ) now compiles within ~97MB RSS.

Reported by: mandree

MFC r263320:

Add separate patch files for all the customizations we have currently
applied to our copy of llvm/clang. These can be applied in alphabetical
order to a pristine llvm/clang 3.4 release source tree, to result in the
same version used in FreeBSD.

This is intended to clearly document all the changes until now, which
mostly consist of cherry pickings from the respective upstream trunks,
plus a number of hand-written FreeBSD-specific ones. Hopefully those
can eventually be cleaned up and sent upstream too.


263764 26-Mar-2014 dim

MFC r262613:

Merge the projects/clang-sparc64 branch back to head. This brings in
several updates from the llvm and clang trunks to make the sparc64
backend fully functional.

Apart from one patch to sys/sparc64/include/pcpu.h which is still under
discussion, this makes it possible to let clang fully build world and
kernel for sparc64.

Any assistance with testing this on actual sparc64 hardware is greatly
appreciated, as there will unavoidably be bugs left.

Many thanks go to Roman Divacky for his upstream work on getting the
sparc64 backend into shape.

MFC r262985:

Repair a few minor mismerges from r262261 in the clang-sparc64 project
branch. This is also to minimize differences with upstream.


263509 21-Mar-2014 dim

MFC 254790 (by emaste):

Import llvm r187614 (git 44c8e34), for lldb's use:

Author: Daniel Malea <daniel.malea@intel.com>
Date: Thu Aug 1 21:18:16 2013 +0000

Fixed the Intel-syntax X86 disassembler to respect the (existing)
option for hexadecimal immediates, to match AT&T syntax. This also
brings a new option for C-vs-MASM-style hex.

Patch by Richard Mitton
Reviewed: http://llvm-reviews.chandlerc.com/D1243

MFC 258003 (by emaste):

Merge upstream LLVM r182803:

[Mips] Add Mips specific dynamic table entry tags.

This is to support an upcoming LLDB snapshot update.

Reviewed by: dim@
Sponsored by: DARPA, AFRL

MFC 258005:

Merge upstream LLVM r192118:

Formally added an explicit enum for DWARF TLS support. No functionality
change.

Reviewed by: dim@
Sponsored by: DARPA, AFRL

MFC 261991:

Upgrade our copy of llvm/clang to 3.4 release. This version supports
all of the features in the current working draft of the upcoming C++
standard, provisionally named C++1y.

The code generator's performance is greatly increased, and the loop
auto-vectorizer is now enabled at -Os and -O2 in addition to -O3. The
PowerPC backend has made several major improvements to code generation
quality and compile time, and the X86, SPARC, ARM32, Aarch64 and SystemZ
backends have all seen major feature work.

Release notes for llvm and clang can be found here:
<http://llvm.org/releases/3.4/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html>

MFC 262303:

Pull in r197521 from upstream clang trunk (by rdivacky):

Use the integrated assembler by default on FreeBSD/ppc and ppc64.

Requested by: jhibbits

MFC 262611:

Pull in r196874 from upstream llvm trunk:

Fix a crash that occurs when PWD is invalid.

MCJIT needs to be able to run in hostile environments, even when PWD
is invalid. There's no need to crash MCJIT in this case.

The obvious fix is to simply leave MCContext's CompilationDir empty
when PWD can't be determined. This way, MCJIT clients,
and other clients that link with LLVM don't need a valid working directory.

If we do want to guarantee valid CompilationDir, that should be done
only for clients of getCompilationDir(). This is as simple as checking
for an empty string.

The only current use of getCompilationDir is EmitGenDwarfInfo, which
won't conceivably run with an invalid working dir. However, in the
purely hypothetically and untestable case that this happens, the
AT_comp_dir will be omitted from the compilation_unit DIE.

This should help fix assertions occurring with ports-mgmt/tinderbox,
when it is using jails, and sometimes invalidates clang's current
working directory.

Reported by: decke

MFC 262809:

Pull in r203007 from upstream clang trunk:

Don't produce an alias between destructors with different calling conventions.

Fixes pr19007.

(Please note that is an LLVM PR identifier, not a FreeBSD one.)

This should fix Firefox and/or libxul crashes (due to problems with
regparm/stdcall calling conventions) on i386.

Reported by: multiple users on freebsd-current
PR: bin/187103

MFC 263048:

Repair recognition of "CC" as an alias for the C++ compiler, since it
was silently broken by upstream for a Windows-specific use-case.

Apparently some versions of CMake still rely on this archaic feature...

Reported by: rakuco

MFC 263049:

Garbage collect the old way of adding the libstdc++ include directories
in clang's InitHeaderSearch.cpp. This has been superseded by David
Chisnall's commit in r255321.

Moreover, if libc++ is used, the libstdc++ include directories should
not be in the search path at all. These directories are now only used
if you pass -stdlib=libstdc++.


263247 16-Mar-2014 dim

Pull in r192123 from upstream llvm trunk (by Benjamin Kramer):

X86: Fix type check. Just because an integer type is illegal doesn't
mean it's i64.

Fixes PR17495, where an i24 triggered this code. It's intended to
optimize i64 loads on 32 bit x86.

Fixes "Cannot select" fatal errors when building the audio/jack port
with ALSA support turned on.

This is a direct commit to stable/9 and stable/10, since head already
has the commit as part of an upgrade to llvm/clang 3.4.

Reported by: Radim Kolar <hsn@sendmail.cz> via http://llvm.org/bugs/


261225 28-Jan-2014 dim

MFC r261162:

Pull in r195679 from upstream llvm trunk:

Don't use nopl in cpus that don't support it.

Patch by Mikulas Patocka. I added the test. I checked that for cpu names that
gas knows about, it also doesn't generate nopl.

The modified cpus:
i686 - there are i686-class CPUs that don't have nopl: Via c3, Transmeta
Crusoe, Microsoft VirtualBox - see
https://bbs.archlinux.org/viewtopic.php?pid=775414
k6, k6-2, k6-3, winchip-c6, winchip2 - these are 586-class CPUs
via c3 c3-2 - see https://bugs.archlinux.org/task/19733 as a proof that
Via c3 and c3-Nehemiah don't have nopl

PR: bin/185777


259989 28-Dec-2013 dim

MFC r259888:

Pull in r183971 from upstream llvm trunk:

X86: cvtpi2ps is just an SSE instruction with MMX operands. It has no AVX
equivalent.

Give it the right register format so we can also emit it when AVX is enabled.

This should fix a "Cannot select: intrinsic %llvm.x86.sse.cvtpi2ps" fatal error
in clang while building the gnuradio port for amd64.

Reported by: db


259011 05-Dec-2013 dim

MFC r255076:

Pull in r189672 from upstream llvm trunk:

InstCombine: Check for zero shift amounts before subtracting one
causing integer overflow.

PR17026. Also avoid undefined shifts and shift amounts larger than 64
bits (those are always undef because we can't represent integer types
that large).

This should fix assertion failures when building the emulators/xmame
port.

Reported by: bapt


258608 25-Nov-2013 dim

MFC r258350:

Pull in r191896 from upstream llvm trunk:

CaptureTracking: Plug a loophole in the "too many uses" heuristic.

The heuristic was added to avoid spending too much compile time in a
specially crafted test case (PR17461, PR16474) with many uses on a
select or bitcast instruction can still trigger the slow case. Add a
check for that case.

This only affects compile time, don't have a good way to test it.

This fixes the excessive compile time spent on a specific file of the
graphics/rawtherapee port.

Reported by: mandree


256382 12-Oct-2013 dim

MFC r256030:

Pull in r189644 from upstream llvm trunk:

Add ms_abi and sysv_abi attribute handling.

Based on a patch by Benno Rice!

This will help to develop EFI support.

Verified by: benno


256178 09-Oct-2013 dim

MFC r256090:

Pull in r192064 from upstream llvm trunk:

X86: Don't fold spills into SSE operations if the stack is unaligned.

Regalloc can emit unaligned spills nowadays, but we can't fold the
spills into SSE ops if we can't guarantee alignment. PR12250.

This fixes unaligned SSE accesses (leading to a SIGBUS) which could
occur in the ffmpeg ports.

Reported by: tijl


256085 06-Oct-2013 dim

MFC r256024:

Pull in r186338 from upstream llvm trunk:

Remove invalid assert in DAGTypeLegalizer::RemapValue

There is a comment at the top of DAGTypeLegalizer::PerformExpensiveChecks
which, in part, says:

// Note that these invariants may not hold momentarily when processing a node:
// the node being processed may be put in a map before being marked Processed.

Unfortunately, this assert would be valid only if the above-mentioned invariant
held unconditionally. This was causing llc to assert when, in fact,
everything was fine.

Thanks to Richard Sandiford for investigating this issue!

Fixes PR16562.

This fixes assertions which could occur in the multimedia/ffmpeg1 and
multimedia/ffmpeg2 ports.

Reported by: Matthias Apitz <guru@unixarea.de>


256059 04-Oct-2013 dim

MFC r255978:

Pull in r191711 from upstream llvm trunk:

The X86FixupLEAs pass for Intel Atom must not call
convertToThreeAddress on ADD16rr opcodes, if src1 != src, since that
would cause convertToThreeAddress to try to create a virtual register.
This is not permitted after register allocation, which is when the
X86FixupLEAs pass runs.

This patch fixes PR16785.

Pull in r191715 from upstream llvm trunk:

Forgot to add a break statement.

This should enable building the x11-toolskits/libXaw port with
CPUTYPE=atom.

Reported by: Kenta Suzumoto <kentas@hush.com>


255946 29-Sep-2013 dim

MFC r255804:

Pull in r191165 from upstream llvm trunk:

ISelDAG: spot chain cycles involving MachineNodes

Previously, the DAGISel function WalkChainUsers was spotting that it
had entered already-selected territory by whether a node was a
MachineNode (amongst other things). Since it's fairly common practice
to insert MachineNodes during ISelLowering, this was not the correct
check.

Looking around, it seems that other nodes get their NodeId set to -1
upon selection, so this makes sure the same thing happens to all
MachineNodes and uses that characteristic to determine whether we
should stop looking for a loop during selection.

This should fix PR15840.

Specifically, this fixes the long-standing assertion failure when
compiling the multimedia/gstreamer port on i386. Thanks to Tijl
Coosemans for his help in getting upstream to fix it.


253192 11-Jul-2013 dim

MFC r253042:

Pull in r185616 from llvm trunk:

FastISel can only append to basic blocks.

Compute the insertion point from the end of the basic block instead of
skipping labels from the front.

This caused failures in landing pads when live-in copies where inserted
before instruction selection.

I missed this change in r252720; without it, certain compilation flags
can cause exception labels to not be generated, but still referenced,
leading to link errors.

Reported by: zeising


252993 07-Jul-2013 dim

MFC r252720:

Pull in r185594 from llvm trunk:

Add MachineBasicBlock::addLiveIn().

This function adds a live-in physical register to an MBB and ensures
that it is copied to a virtual register immediately.

Pull in r185615 from llvm trunk:

Live-in copies go *after* EH_LABELs.

This will soon be tested by exception handling working at all.

Pull in r185617 from llvm trunk:

Simplify landing pad lowering.

Stop using the ISD::EXCEPTIONADDR and ISD::EHSELECTION when lowering
landing pad arguments. These nodes were previously legalized into
CopyFromReg nodes, but that never worked properly because the
CopyFromReg node weren't guaranteed to be scheduled at the top of the
basic block.

This meant the exception pointer and selector registers could be
clobbered before being copied to a virtual register.

This patch copies the two physical registers to virtual registers at
the beginning of the basic block, and lowers the landingpad instruction
directly to two CopyFromReg nodes reading the *virtual* registers. This
is safe because virtual registers don't get clobbered.

A future patch will remove the ISD::EXCEPTIONADDR and ISD::EHSELECTION
nodes.

Together, these changes fix llvm PR 16038 ('qt4 webcore file results in
"Bad machine code: Using an undefined physical register"'), and should
make it possible again to compile the www/qt4-webkit port again on the
i386 arch, without using a CPUTYPE=i686 or higher setting.


252723 04-Jul-2013 dim

Merge clang 3.3 release and various fixes: r241214, r246705, r248548,
r249423, r249817, r250217, r250593, r250616, r250997, r251216, r251662,
r251761, r251785, r251790, r252039.

MFC r241214 (by jkim):
Do not install incomplete unwind.h from clang. This header file was meant
to be a wrapper for the canonical system header file. Unfortunately, we do
not have one (yet) and some times it is causing weird failures when clang
is used for building ports. More complete and correct file will come from
libcxxrt in the future.

Discussed with: dim, kib, theraven

MFC r246705 (by andrew):
Allow us to build clang for ARM EABI. Clang and llvm use the
arm-gnueabi-freebsd10.0 triple for EABI. Use this when we are on arm or
armv6 and are building for EABI.

Reviewed by: dim

MFC r248548 (by andrew):
Pull in r177252 from upstream clang trunk:

Make sure to use same EABI version for external assembler as for
integrated as.

This allows us to use gcc on a world built with clang on ARM.

MFC r249423:
Upgrade our copy of llvm/clang to trunk r178860, in preparation of the
upcoming 3.3 release (branching and freezing expected in a few weeks).

Preliminary release notes can be found at the usual location:
<http://llvm.org/docs/ReleaseNotes.html>

An MFC is planned once the actual 3.3 release is finished.

MFC r249817:
Pull in r180121 from upstream llvm trunk:

LoopVectorizer: Fix 15830. When scalarizing and unrolling stores make
sure that the order in which the elements are scalarized is the same
as the original order.
This fixes a miscompilation in FreeBSD's regex library.

This should fix lib/libc/regex/regcomp.c at -O3 with clang 3.3 r178860
on CPUs with SSE. Before this change, the vectorizer could incorrectly
rearrange the second loop in computejumps(), leading to possibly invalid
entries in the re_gets::charjump table.

The net result was that for example "sed s/@CC@/foo/" failed to work
correctly, leading to trouble with many configure scripts.

MFC r250217:
Allow building clang on older FreeBSD releases, where log2() does not
exist yet. With this change, I have verified that building head on
8.1-RELEASE works.

Noticed by: Ryan Stone <rysto32@gmail.com>

MFC r250593:
Pull in r181286 from upstream llvm trunk:

LoopVectorize: getConsecutiveVector must respect signed arithmetic

We were passing an i32 to ConstantInt::get where an i64 was needed and we must
also pass the sign if we pass negatives numbers. The start index passed to
getConsecutiveVector must also be signed.

Should fix PR15882.

This should fix Firefox crashes some people have been reporting, when it
is compiled with -O3.

MFC r250616:
Use an ugly hack to get around bootstrapping problems when building
clang on head between r239347 and r245428.

The former revision introduced CLOCK_PROCESS_CPUTIME_ID as a clock id
for the clock_gettime() function and friends, but it was only added in
<sys/time.h>, not in <time.h>. Any program including <time.h> would
therefore not be able to use CLOCK_PROCESS_CPUTIME_ID, even though the
value of _POSIX_CPUTIME indicates its existence. The latter revision
synchronized the defines again.

Work around this problem by defining the id on the command line for the
particular .cpp file that needs it. If the id ever changes value, this
hack will need to be updated.

MFC r250997:
Pull in r182656 from upstream llvm trunk:

LoopVectorize: LoopSimplify can't canonicalize loops with an
indirectbr in it, don't assert on those cases.

Fixes PR16139.

This should fix clang assertion failures when optimizing at -O3, similar
to:

Assertion failed: (TheLoop->getLoopPreheader() && "No preheader!!"),
function canVectorize, file
contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp, line 2171.

Reported by: O. Hartmann <ohartman@zedat.fu-berlin.de>
PR: ports/178332, ports/178977

MFC r251216 (by ed):
Pull in r183033 and r183036 from LLVM trunk:

Add support for optimized (non-generic) atomic libcalls.

For integer types of sizes 1, 2, 4 and 8, libcompiler-rt (and libgcc)
provide atomic functions that pass parameters by value and return
results directly.

libgcc and libcompiler-rt only provide optimized libcalls for
__atomic_fetch_*, as generic libcalls on non-integer types would make
little sense. This means that we can finally make __atomic_fetch_*
work
on architectures for which we don't provide these operations as
builtins
(e.g. ARM).

This should fix the dreaded "cannot compile this atomic library call
yet" error that would pop up once every while.

This should make it possible for me to get C11 atomics working on all of
our platforms.

MFC r251662:
Upgrade our copy of llvm/clang to 3.3 release.

Release notes are still in the works, these will follow soon.

MFC r251761:
Pull in r181620 from llvm trunk:

[ms-inline asm] Fix a crasher when we fail on a direct match.

The issue was that the MatchingInlineAsm and VariantID args to the
MatchInstructionImpl function weren't being set properly. Specifically, when
parsing intel syntax, the parser thought it was parsing inline assembly in the
at&t dialect; that will never be the case.

The crash was caused when the emitter tried to emit the instruction, but the
operands weren't set. When parsing inline assembly we only set the opcode, not
the operands, which is used to lookup the instruction descriptor.
rdar://13854391 and PR15945

Also, this commit reverts r176036. Now that we're correctly parsing the intel
syntax the pushad/popad don't match properly. I've reimplemented that fix using
a MnemonicAlias.

Pull in r183907 from llvm trunk:

X86: Make the cmov aliases work with intel syntax too.

These commits make a number of Intel-style inline assembly mnemonics
aliases (occurring in several ports) work properly, which could cause
assertions otherwise.

Reported by: kwm, bapt

MFC r251785 (by ed)
Pull in r184040 from upstream clang trunk:

Emit native implementations of atomic operations on FreeBSD/armv6.

Just like on Linux, FreeBSD/armv6 assumes the system supports
ldrex/strex unconditionally. It is also used by the kernel. We can
therefore enable support for it, like we do on Linux.

While there, change one of the unit tests to explicitly test against
armv5 instead of armv7, as it actually tests whether libcalls are
emitted.

MFC r251790 (by andrew):
Pull in r183926 from LLVM trunk:

Allow clang to build __clear_cache on ARM.

__clear_cache is special. It needs no signature, but is a real function in
compiler_rt or libgcc.

Patch by Andrew Turner.

This allows us to build the __clear_cache function in compiler-rt.

MFC r252039:
Pull in r183984 from llvm trunk:

Make PrologEpilogInserter save/restore all callee saved registers in
functions which call __builtin_unwind_init()

__builtin_unwind_init() is an undocumented gcc intrinsic which has
this effect, and is used in libgcc_eh.

Goes part of the way toward fixing PR8541.

This obsoletes the ugly hack to libgcc's unwind code from r245272, and
should also work for other arches, so revert the hack too.


251645 12-Jun-2013 dim

MFC r251431:

Pull in r183297 from upstream llvm trunk:

PR15662: Optimized debug info produces out of order function
parameters

When a function is inlined we lazily construct the variables
representing the function's parameters. After that, we add any
remaining unused parameters.

If the function doesn't use all the parameters, or uses them out of
order, then the DWARF would produce them in that order, producing a
parameter order that doesn't match the source.

This fix causes us to always keep the arg variables at the start of
the variable list & in the original order from the source.

Reported by: avg


249518 15-Apr-2013 dim

Pull in r178636 from upstream llvm trunk:

Second pass at addressing PR15351 by explicitly checking for AVX
support when getting the host processor information. It emits a
.byte sequence on GNUC compilers to work around lack of xgetbv
support with older assemblers, and resolves a comment typo found in
the previous patch.

This should fix crashes due to emitting of AVX instructions on certain
processors, which do not support then, when using -march=native.

This is a direct commit to stable/9, since head has a complete import of
llvm/clang trunk, and there is no single commit to merge.

Reported by: Kubilay Kocak <koobs.freebsd@gmail.com>


247625 02-Mar-2013 dim

MFC r247205:

Pull in r175962 from upstream llvm trunk:

X86: Disable cmov-memory patterns on subtargets without cmov.

Fixes PR15115.

For the i386 arch, this should enable cmov instructions only on
-march=pentiumpro and higher. Since our default CPU is i486, cmov
instructions will now be disabled by default.


247157 22-Feb-2013 dim

MFC r247003:

Pull in r175360 from upstream llvm trunk:

MCParser: Reject .balign with non-pow2 alignments.

GNU as rejects them and there are configure scripts in the wild that
check if the assembler rejects ".align 3" to determine whether the
alignment is in bytes or powers of two.


247156 22-Feb-2013 dim

MFC r246858:

Pull in r175057 from upstream llvm trunk:

X86: Disable generation of rep;movsl when %esi is used as a base pointer.

This happens when there is both stack realignment and a dynamic alloca in the
function. If we overwrite %esi (rep;movsl uses fixed registers) we'll lose the
base pointer and the next register spill will write into oblivion.

Fixes PR15249 and unbreaks firefox on i386/freebsd. Mozilla uses dynamic allocas
and freebsd a 4 byte stack alignment.


246069 29-Jan-2013 pfg

Clean some 'svn:executable' properties in the tree.

Submitted by: Christoph Mallon

While here, merge some other mergeinfo properties that
were left behind from my commits

/head/include:r241008,241141,241181
/head/contrib/gcc:r244776,244792
/head/cddl:r238457,238509,238558


245431 14-Jan-2013 dim

MFC r244628:

Upgrade our copy of llvm/clang to 3.2 release.

Release notes for llvm:
http://llvm.org/releases/3.2/docs/ReleaseNotes.html

Release notes for clang:
http://llvm.org/releases/3.2/tools/clang/docs/ReleaseNotes.html


243191 17-Nov-2012 dim

MFC r242835:

Reduce LLVM's default stack alignment for i386 from 16 to 4 bytes, as
the FreeBSD ABI requires. This is essentially a revert of upstream llvm
commit r126226, and it will be reverted by upstream too.


242657 06-Nov-2012 dim

MFC r242380:

Pull in r165377 from upstream llvm trunk:

X86: fcmov doesn't handle all possible EFLAGS, fall back to a branch
for the others.

Otherwise it will try to use SSE patterns and fail horribly if sse is
disabled.

Fixes PR14035.

This should fix the following assertion failure:

Assertion failed: (Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP
register!"), function getFPReg, file
contrib/llvm/lib/Target/X86/X86FloatingPoint.cpp, line 330.

which can show up when compiling contrib/compiler-rt, using -march=i686
through -march=pentium3 (CPU's which do support fcmov, but don't support
SSE2).


242393 31-Oct-2012 dim

MFC r242007:

Pull in r165367 from upstream llvm trunk:

Make sure always-inline functions get inlined. <rdar://problem/12423986>

Without this change, when the estimated cost for inlining a function with
an "alwaysinline" attribute was lower than the inlining threshold, the
getInlineCost function was returning that estimated cost rather than the
special InlineCost::AlwaysInlineCost value. That is fine in the normal
inlining case, but it can fail when the inliner considers the opportunity
cost of inlining into an internal or linkonce-odr function. It may decide
not to inline the always-inline function in that case. The fix here is just
to make getInlineCost always return the special value for always-inline
functions. I ran into this building clang with libc++. Tablegen failed to
link because of an always-inline function that was not inlined. I have been
unable to reduce the testcase down to a reasonable size.

This should fix the link errors that were reported when atf-run was
compiled with clang -stdlib=libc++. In this case, at -O3 optimization,
some calls to basic_ios::clear() were not inlined, even when the
function was marked __always_inline__.

Reported by: Jan Beich <jbeich@tormail.org>


242143 26-Oct-2012 dim

MFC r241895:

Pull in r165878 from upstream llvm trunk:

X86: Disable long nops for all cpus prior to pentiumpro/i686.

This is the safest approach for now. If you think long nops matter a
lot for performance, compile with -march=i686 or higher. :)


241506 13-Oct-2012 dim

MFC r241430:

Pull in r164132 from upstream llvm trunk:

When creating MCAsmBackend pass the CPU string as well. In X86AsmBackend
store this and use it to not emit long nops when the CPU is geode which
doesnt support them.

Fixes PR11212.

Pull in r164133 from upstream clang trunk:

Follow up on llvm r164132.

This should prevent illegal instructions when building world on Geode
CPUs (e.g. Soekris).


241505 13-Oct-2012 dim

MFC r241427:

Pull in r163710 from upstream llvm trunk:

Add support for AMD Geode.


240897 24-Sep-2012 dim

MFC r240531:

Pull in r163967 from upstream llvm trunk:

X86: Emitting x87 fsin/fcos for sinf/cosf is not safe without unsafe
fp math.

This should make clang emit calls to libm for sinf/cosf by default.


236385 01-Jun-2012 dim

MFC r236260:

Pull in r156591 from upstream llvm trunk:

Allow unique_file to take a mode for file permissions, but default
to user only read/write.

and r156592 from upstream clang trunk:

For final output files create them with mode 0664 to match other
compilers and expected defaults.

This should fix clang creating files with mode 0600.

Reported by: James <james@hicag.org>


236144 27-May-2012 dim

MFC r235864:

Upgrade our copy of llvm/clang to 3.1 release. Release notes can be
found at: http://llvm.org/releases/3.1/docs/ReleaseNotes.html


235633 18-May-2012 dim

MFC r234353:

Upgrade our copy of llvm/clang to trunk r154661, in preparation of the
upcoming 3.1 release (expected in a few weeks). Preliminary release
notes can be found at: <http://llvm.org/docs/ReleaseNotes.html>

MFC r234982:

Upgrade our copy of llvm/clang to r155985, from upstream's release_31
branch. This brings us very close to the 3.1 release, which is planned
for May 14th.

MFC r235058:

Make sure a few new internal clang headers get installed, I missed these
in the last import. They are sometimes needed when you want to use
advanced instructions.

Also, add clang's internal stdalign.h header to ObsoleteFiles.inc, since
it is redundant: we already have a stdalign.h header in /usr/include.

Pointy hat to: dim
PR: kern/167574
Submitted by: jkim
Reported by: Oliver Hartmann <ohartman@zedat.fu-berlin.de>


230969 03-Feb-2012 dim

MFC r230393:

Pull in r148240 from upstream llvm trunk:

Make sure the non-SSE lowering for fences correctly clobbers EFLAGS.
PR11768.

In particular, this fixes segfaults during the build of devel/icu on
i386. The __sync_synchronize() builtin used for implementing icu's
internal barrier could lead to incorrect behaviour.


229042 30-Dec-2011 dim

MFC r228379:

Upgrade our copy of llvm/clang to 3.0 release. Release notes can be
found at: http://llvm.org/releases/3.0/docs/ReleaseNotes.html

MFC r228383:

Use the correct upstream revision number for llvm/clang 3.0 release.

The r145546 revision is from branches/release_30, the r145349 revision
is from tags/RELEASE_30/final.


226890 28-Oct-2011 dim

MFC r226633:

Upgrade our copy of llvm/clang to r142614, from upstream's release_30
branch. This brings us very close to the 3.0 release, which is expected
November 16, 2011.

Approved by: re (kib)


225949 03-Oct-2011 dim

MFC r225880:
Revive the LLVM and Clang license files, which were removed in my
too-thorough cleanup of unused files, in r213695. Also make sure these
get installed under /usr/share/doc.

Submitted by: rwatson, brooks
Pointy hat to: dim
Approved by: re (kib)


225736 23-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


224145 17-Jul-2011 dim

Upgrade our copy of llvm/clang to r135360, from upstream's trunk.


223017 12-Jun-2011 dim

Upgrade our copy of llvm/clang to r132879, from upstream's trunk.


221503 05-May-2011 dim

Make cross-compiling using clang work better, by respecting the
LLVM_HOSTTRIPLE that is defined during the cross-tools stage.

Using clang, you can now build amd64 world and kernel on i386, and vice
versa. Other arches still need work.


221345 02-May-2011 dim

Upgrade our copy of llvm/clang to r130700, from upstream's trunk.


219077 27-Feb-2011 dim

Update llvm/clang to trunk r126547.

There are several bugfixes in this update, but the most important one is
to ensure __start_ and __stop_ symbols for linker sets and kernel module
metadata are always emitted in object files:

http://llvm.org/bugs/show_bug.cgi?id=9292

Before this fix, if you compiled kernel modules with clang, they would
not be properly processed by kldxref, and if they had any dependencies,
the kernel would fail to load those. Another problem occurred when
attempting to mount a tmpfs filesystem, which would result in 'operation
not supported by device'.


219076 27-Feb-2011 dim

Instead of defining LLVM_MULTITHREADED as 0 or 1, define or undefine it,
and test appropriately. Otherwise it might erroneously pick up some
pthread primitives, and fail to link.


218893 20-Feb-2011 dim

Upgrade our copy of llvm/clang to r126079, from upstream's trunk.

This contains many improvements, primarily better C++ support, an
integrated assembler for x86 and support for -pg.


213695 11-Oct-2010 dim

Remove more unneeded files and directories from contrib/llvm. This
still allows us to build tblgen and clang, and further reduces the
footprint in the tree.

Approved by: rpaulo (mentor)


213534 07-Oct-2010 dim

Upgrade Clang and LLVM to the 2.8 release. See here for release notes:
http://llvm.org/releases/2.8/docs/ReleaseNotes.html

Approved by: rpaulo (mentor)


212904 20-Sep-2010 dim

Upgrade our Clang in base to r114020, from upstream's release_28 branch.

Approved-by: rpaulo (mentor)


210299 20-Jul-2010 ed

Upgrade our Clang in base to r108428.

This commit merges the latest LLVM sources from the vendor space. It
also updates the build glue to match the new sources. Clang's version
number is changed to match LLVM's, which means /usr/include/clang/2.0
has been renamed to /usr/include/clang/2.8.

Obtained from: projects/clangbsd


208958 09-Jun-2010 rdivacky

Comment out piece of code using __clear_cache() which FreeBSD
does not have. This is only used for JIT on ARM so it's harmless.

Approved by: ed (mentor)


208954 09-Jun-2010 rdivacky

Import LLVM/clang from vendor stripped of docs/ test/ website/ www/ examples/
in llvm/ and/or llvm/contrib/clang/ respectively.

Approved by: ed (mentor)
Approved by: core


208599 27-May-2010 rdivacky

Update LLVM to r104832.


207631 04-May-2010 rdivacky

Update LLVM to r103052.


207618 04-May-2010 rdivacky

Update LLVM to r103004.


206274 06-Apr-2010 rdivacky

Update LLVM to r100520.


206124 03-Apr-2010 rdivacky

Update LLVM to r100285.


206083 02-Apr-2010 rdivacky

Update LLVM to r100181.


205407 21-Mar-2010 rdivacky

Update LLVM to r99115.


205218 16-Mar-2010 rdivacky

Update LLVM to r98631.


204961 10-Mar-2010 rdivacky

Update LLVM to r98164.


204792 06-Mar-2010 rdivacky

Update LLVM to r97873.


204642 03-Mar-2010 rdivacky

Update LLVM to 97654.


203954 16-Feb-2010 rdivacky

Update LLVM to r96341.


202878 23-Jan-2010 rdivacky

Update LLVM to r94309.


202375 15-Jan-2010 rdivacky

Update LLVM to 93512.


201360 01-Jan-2010 rdivacky

Update LLVM to 92395.


200581 15-Dec-2009 rdivacky

Update LLVM to 91430.


199989 01-Dec-2009 rdivacky

Update LLVM to r90226.


199511 19-Nov-2009 rdivacky

Update LLVM to r89337.


199481 18-Nov-2009 rdivacky

Update LLVM to r89205.


198953 05-Nov-2009 rdivacky

Update LLVM to r86140.


198906 04-Nov-2009 rdivacky

Delete this file.


198892 04-Nov-2009 rdivacky

Update LLVM to r86025.


198413 23-Oct-2009 rdivacky

This was removed upstream.


198396 23-Oct-2009 rdivacky

Update LLVM to r84949.


198138 15-Oct-2009 rdivacky

Delete all stale files.


198113 15-Oct-2009 rdivacky

Update llvm to r84175.


198090 14-Oct-2009 rdivacky

Update llvm to r84119.


195340 04-Jul-2009 ed

Import LLVM 74788.


195098 27-Jun-2009 ed

Import LLVM r74383.


194754 23-Jun-2009 ed

Import LLVM r73984.

It seems I keep importing sources at very unlucky moments. Let's see
what this revision of LLVM does.


194710 23-Jun-2009 ed

Import LLVM r73954.


194612 22-Jun-2009 ed

Update LLVM sources to r73879.


194178 14-Jun-2009 ed

Import LLVM r73340.


193724 08-Jun-2009 ed

Import LLVM r73070.

Now I'm going to stop importing code for a while. I spent a lot of time
the last couple of days figuring out which LLVM commit caused g++ to
miscompile, which in its turn caused Clang to miscompile the next build.
I had to run `make buildworld' twice each time I bisected a revision.


193630 07-Jun-2009 ed

Import LLVM r73021.


193574 06-Jun-2009 ed

Import LLVM, at r72995.

We should now have support for #pragma weak.


193399 03-Jun-2009 ed

Import LLVM, at r72805, which fixes PR4315 and PR4316.

Normally I'm not updating sources this often, but I want to get rid of
this breakage, because right now I can't offer a proper source snapshot
yet.


193378 03-Jun-2009 ed

Import LLVM, at r72770.

This should fix LLVM PR4225.


193323 02-Jun-2009 ed

Import LLVM, at r72732.