Page MenuHomePhabricator

MaskRay (Fangrui Song)
UserAdministrator

Projects

User Details

User Since
Dec 30 2016, 3:24 PM (223 w, 5 d)
Roles
Administrator

Recent Activity

Today

MaskRay accepted D100250: [yaml2obj/obj2yaml/llvm-readobj] Support printing and parsing AVR-specific e_flags.

LGTM.

Wed, Apr 14, 4:48 PM · Restricted Project
MaskRay retitled D100328: Fix bug in .eh_frame/.debug_frame PC offset calculation for DW_EH_PE_pcrel from Fixed bug in .eh_frame/.debug_frame PC offset calculation for DW_EH_PE_pcrel to Fix bug in .eh_frame/.debug_frame PC offset calculation for DW_EH_PE_pcrel.
Wed, Apr 14, 4:40 PM · Restricted Project
MaskRay retitled D100328: Fix bug in .eh_frame/.debug_frame PC offset calculation for DW_EH_PE_pcrel from Fixed bug in eh_frame PC offset calculation for DW_EH_PE_pcrel to Fixed bug in .eh_frame/.debug_frame PC offset calculation for DW_EH_PE_pcrel.
Wed, Apr 14, 4:40 PM · Restricted Project
MaskRay accepted D100328: Fix bug in .eh_frame/.debug_frame PC offset calculation for DW_EH_PE_pcrel.

LG. The stored address is used as EHFrameAddress in llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp

1134           // Decode the LSDA if the CIE augmentation string said we should.                                                                                                                                                       
1135           if (Cie->getLSDAPointerEncoding() != DW_EH_PE_omit) {
1136             LSDAAddress = Data.getEncodedPointer(                                                                                                                                                                                 
1137                 &Offset, Cie->getLSDAPointerEncoding(),
1138                 EHFrameAddress ? Offset + EHFrameAddress : 0);
1139           }
Wed, Apr 14, 4:37 PM · Restricted Project
MaskRay added inline comments to D100490: [ELF] Check the Elf_Rel addends for dynamic relocations.
Wed, Apr 14, 4:05 PM · Restricted Project
MaskRay added a comment to D100490: [ELF] Check the Elf_Rel addends for dynamic relocations.

The getImplicitAddend enhancement (-z rel) can be moved to a separate patch, but the dynamic only relocation types (JUMP_SLOT, RELATIVE, IRELATIVE, etc) should be removed since they can't be input.

Wed, Apr 14, 4:03 PM · Restricted Project
MaskRay added a comment to D93185: [docs] Use make_unique in FrontendAction example.

@thakis - just FYI, Phab doesn't send mail to the mailing list when a patch is approved without any text. Please include some text when approving patches to make sure there's a record on the mailing list. (@MaskRay has a browser script or the like to automate this - I forget if it's posted somewhere to link to... maybe in the llvm phab docs)

Wed, Apr 14, 3:26 PM · Restricted Project
MaskRay added inline comments to D100489: [llvm-readobj] Fix dumping dynamic relative relocations for SHT_REL.
Wed, Apr 14, 12:08 PM · Restricted Project

Yesterday

MaskRay added a comment to D69428: [GlobalOpt] Remove valgrind specific hacks (revert r160529).

clang++ -O1 a.cc b.cc -fsanitize=leak had no leak before and reported a leak with this patch. You can also change -O1 to -O2 or -O3. -fsanitize=leak can be changed to -fsanitize=address. You may remove -fsanitize= and use valgrind.

I'd question whether this is a feature or a bug though: if a user really want to intentionally "leak" this way, they could mark the static void *g; with __attribute__((__used__)) to prevent the optimization, or make the store volatile.

Tue, Apr 13, 8:45 PM · Restricted Project
MaskRay accepted D100433: [llvm-objdump] Switch command-line parsing from llvm::cl to OptTable.
Tue, Apr 13, 7:58 PM · Restricted Project
MaskRay accepted D100434: [llvm-symbolizer] remove unused variable.

LGTM.

Tue, Apr 13, 7:48 PM · Restricted Project
MaskRay added a comment to D69428: [GlobalOpt] Remove valgrind specific hacks (revert r160529).

static void *g;

Tue, Apr 13, 7:16 PM · Restricted Project
MaskRay closed D100115: [RISCV] Add missing part of instruction vmsge {u}. VX.

Your commit description was not formatted correctly. You can read other commits for references.

Tue, Apr 13, 4:25 PM · Restricted Project
MaskRay added a comment to D100251: [IR][sanitizer] Set nounwind on module ctor/dtor, additionally set uwtable if -fasynchronous-unwind-tables.

This touches sanitizers so hope #sanitizers folks can weigh in as well.

Tue, Apr 13, 2:46 PM · Restricted Project, Restricted Project

Mon, Apr 12

MaskRay added inline comments to rGf2e4f3eff3c9: Reapply "[DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs….
Mon, Apr 12, 4:39 PM
MaskRay accepted D100085: [X86] Support -march=rocketlake.
Mon, Apr 12, 3:44 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay committed rG0a614fff4f47: [ARM] Fix -Wmissing-field-initializers (authored by MaskRay).
[ARM] Fix -Wmissing-field-initializers
Mon, Apr 12, 2:28 PM
MaskRay updated the summary of D100251: [IR][sanitizer] Set nounwind on module ctor/dtor, additionally set uwtable if -fasynchronous-unwind-tables.
Mon, Apr 12, 2:15 PM · Restricted Project, Restricted Project
MaskRay added a comment to D100251: [IR][sanitizer] Set nounwind on module ctor/dtor, additionally set uwtable if -fasynchronous-unwind-tables.

-fno-exceptions -fno-asynchronous-unwind-tables -g produces .debug_frame
while
-fno-exceptions -fno-asynchronous-unwind-tables -g -fsanitize=address produces .eh_frame.

Does this patch change that behavior?

Mon, Apr 12, 1:27 PM · Restricted Project, Restricted Project
MaskRay committed rG0a92aff721f4: Replace uses of std::iterator with explicit using (authored by hamzasood).
Replace uses of std::iterator with explicit using
Mon, Apr 12, 10:47 AM
MaskRay closed D67586: Replace uses of std::iterator with explicit using.
Mon, Apr 12, 10:47 AM · Restricted Project, Restricted Project
MaskRay added a comment to D67586: Replace uses of std::iterator with explicit using.

I had no idea that this was left incomplete. I've rebased the patch and applied the same process to some new classes that were added in the meantime.

I don't have commit access anymore after the move to Git, so I'd appreciate it if someone could commit this on my behalf.

Mon, Apr 12, 10:39 AM · Restricted Project, Restricted Project

Sat, Apr 10

MaskRay requested review of D100251: [IR][sanitizer] Set nounwind on module ctor/dtor, additionally set uwtable if -fasynchronous-unwind-tables.
Sat, Apr 10, 2:27 PM · Restricted Project, Restricted Project

Fri, Apr 9

MaskRay added a comment to D99887: [lld][WebAssembly] Add `--export-if-defined`.

I don't know wasm enough... In ELF, --export-dynamic-symbol only affects defined symbols. --export-dynamic affects all defined symbols. They don't have effect on other symbols.

Interesting.. aside from not really conveying its meaning clearly --export-dynamic-symbol sounds like it might be what we want here.

Fri, Apr 9, 7:04 PM · Restricted Project
MaskRay requested review of D100238: [sanitizer] Set IndentPPDirectives: AfterHash in .clang-format.
Fri, Apr 9, 5:45 PM · Restricted Project
MaskRay accepted D99417: [AArch64][v8.5A] Add BTI to all function starts.

LGTM.

Fri, Apr 9, 4:55 PM · Restricted Project
MaskRay added a comment to D99754: [LLD][ELF][AVR] Propagate ELF flags to the linked image.

I think assembly tests in fine in lld/test/ELF and they typically improve readability. yaml2obj tests tend to be verbose.

Fri, Apr 9, 4:52 PM · lld, Restricted Project

Thu, Apr 8

MaskRay added a comment to D99754: [LLD][ELF][AVR] Propagate ELF flags to the linked image.

llvm/BinaryFormat/ELF.h is typically added along with tests to llvm-readobj/yaml2obj/obj2yaml. See D95728 for an example.

Thu, Apr 8, 8:39 PM · lld, Restricted Project
MaskRay added a comment to D100137: [JumpThreading] merge debug info when merging select+br.

Link: b/184085493
Link: https://bugs.llvm.org/show_bug.cgi?id=39531
Link: https://www.llvm.org/docs/HowToUpdateDebugInfo.html#when-to-merge-instruction-locations
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

We don't have any tag styling like this in LLVM - maybe include some sentences about these links? (& if you like you can write the bug number with "PR39531")

Thu, Apr 8, 4:02 PM · debug-info, Restricted Project
MaskRay added a comment to D99480: [lsan] realloc: don't deallocate if requested size is too large.

I think the failures are to do with whether we have Address and Leak sanitizer enabled. With both it passes, just leak and it doesn't.

(is leak sanitizer a subset of asan? I'm not too familiar with them)

$ grep -P "(malloc_zero|realloc_too_big)" Downloads/stdio\ \(2\)
PASS: LeakSanitizer-AddressSanitizer-armhf :: TestCases/malloc_zero.c (74005 of 75225)
PASS: LeakSanitizer-AddressSanitizer-armhf :: TestCases/realloc_too_big.c (74008 of 75225)
FAIL: LeakSanitizer-Standalone-armhf :: TestCases/malloc_zero.c (74052 of 75225)
******************** TEST 'LeakSanitizer-Standalone-armhf :: TestCases/malloc_zero.c' FAILED ********************
<...>
FAIL: LeakSanitizer-Standalone-armhf :: TestCases/realloc_too_big.c (74059 of 75225)
******************** TEST 'LeakSanitizer-Standalone-armhf :: TestCases/realloc_too_big.c' FAILED ********************
<...>
  LeakSanitizer-Standalone-armhf :: TestCases/malloc_zero.c
  LeakSanitizer-Standalone-armhf :: TestCases/realloc_too_big.c

I see the same thing on an armv8l machine (32 bit armv8). fsanitize address seems to enable leak and address. Just leak doesn't see the leak.

$ ./bin/clang ../llvm-project/compiler-rt/test/lsan/TestCases/realloc_too_big.c -o /tmp/test.o -fsanitize=address && LSAN_OPTIONS=allocator_may_return_null=1:max_allocation_size_mb=1:use_stacks=0 /tmp/test.o
nine: 0xf55007b0
==409056==WARNING: AddressSanitizer failed to allocate 0x100001 bytes

=================================================================
==409056==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 9 byte(s) in 1 object(s) allocated from:
    #0 0x962f6  (/tmp/test.o+0x962f6)
    #1 0xcb1bc  (/tmp/test.o+0xcb1bc)
    #2 0xf78ee062  (/lib/arm-linux-gnueabihf/libc.so.6+0x17062)

SUMMARY: AddressSanitizer: 9 byte(s) leaked in 1 allocation(s).

$ ./bin/clang ../llvm-project/compiler-rt/test/lsan/TestCases/realloc_too_big.c -o /tmp/test.o -fsanitize=leak && LSAN_OPTIONS=allocator_may_return_null=1:max_allocation_size_mb=1:use
_stacks=0 /tmp/test.o
nine: 0xf6c003d0
==409061==WARNING: LeakSanitizer failed to allocate 0x100001 bytes

(side note: the tests aren't enabled for armv8l but they probably could be, I just bodged it since I had easier access to that sort of machine)

Any ideas?

Thu, Apr 8, 9:40 AM · Restricted Project
MaskRay added a comment to rG59e422c90bf4: [lsan][test] Add malloc(0) and realloc(p, 0) tests.

Marked the test UNSUPPORTED for now while we figure this out: https://reviews.llvm.org/rG466fab5c9410abb79f1a70c5075147e9a768124e

Thu, Apr 8, 9:26 AM
MaskRay accepted D99930: [test-suite] Fix CLAMR build with glibc 2.32+.

Looks great!

Thu, Apr 8, 12:25 AM

Wed, Apr 7

MaskRay added a comment to D100085: [X86] Support -march=rocketlake.

Hi @MaskRay, I tried to refactor, but met some difficulties. Since these defines are dictionary ordered, a new #define may insert into a common CHECK. So it is difficult to let different RUN share common CHECKs.

Wed, Apr 7, 11:40 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay committed rG8ac5e440615d: [Driver] Drop $DEFAULT_TRIPLE-$name as a fallback program name (authored by MaskRay).
[Driver] Drop $DEFAULT_TRIPLE-$name as a fallback program name
Wed, Apr 7, 9:01 PM
MaskRay closed D99996: [Driver] Drop $DEFAULT_TRIPLE-$name as a fallback program name.
Wed, Apr 7, 9:01 PM · Restricted Project
MaskRay updated the summary of D99996: [Driver] Drop $DEFAULT_TRIPLE-$name as a fallback program name.
Wed, Apr 7, 9:00 PM · Restricted Project
MaskRay added inline comments to D100085: [X86] Support -march=rocketlake.
Wed, Apr 7, 8:57 PM · Restricted Project, Restricted Project, Restricted Project
MaskRay accepted D99609: [AsmParser] Recognize more escaped characters between single quotes.

LGTM.

Wed, Apr 7, 12:01 PM · Restricted Project
MaskRay added a comment to D99707: Remove "Rewrite Symbols" from codegen pipeline.

@compnerd ^^

Wed, Apr 7, 11:30 AM · Restricted Project
MaskRay added a comment to D100027: [update_llc_test_checks.py] Fix MIPS ASM regex for functions with EH.

This needs a test under test/tools/UpdateTestChecks/update_llc_test_checks/

Wed, Apr 7, 11:28 AM · Restricted Project
MaskRay added a comment to D99996: [Driver] Drop $DEFAULT_TRIPLE-$name as a fallback program name.

To understand better, we will be fixing a bug from 2015, correct?

Wed, Apr 7, 11:24 AM · Restricted Project
MaskRay updated the diff for D98926: [sanitizer] Simplify GetTls with dl_iterate_phdr on Linux and use it on musl/FreeBSD.

Fold D99871 into it

Wed, Apr 7, 11:18 AM · Restricted Project
MaskRay reopened D98926: [sanitizer] Simplify GetTls with dl_iterate_phdr on Linux and use it on musl/FreeBSD.
Wed, Apr 7, 11:17 AM · Restricted Project
MaskRay accepted D99901: [Driver][test] Test intended target only.
Wed, Apr 7, 11:13 AM · Restricted Project
MaskRay added inline comments to D98856: Always emit error for wrong interfaces to scalable vectors, unless cmdline flag is passed..
Wed, Apr 7, 10:34 AM · Restricted Project, Restricted Project

Tue, Apr 6

MaskRay added inline comments to D99409: [clang] Speedup line offset mapping computation.
Tue, Apr 6, 6:00 PM · Restricted Project, Restricted Project
MaskRay requested review of D99996: [Driver] Drop $DEFAULT_TRIPLE-$name as a fallback program name.
Tue, Apr 6, 3:34 PM · Restricted Project
MaskRay committed rGa7ef45bc5c1d: [NewPM] Fix -Wunused-lambda-capture in -DLLVM_ENABLE_ASSERTIONS=off builds… (authored by MaskRay).
[NewPM] Fix -Wunused-lambda-capture in -DLLVM_ENABLE_ASSERTIONS=off builds…
Tue, Apr 6, 11:30 AM
MaskRay added a comment to D99650: Demonstrating lack of thread-safety in BackendUtil.

arc diff 'HEAD^' --draft creates a draft Diff which triggers pre-commit bots but does not trigger llvm-commits, IIRC.

Tue, Apr 6, 10:46 AM · Restricted Project
MaskRay added a comment to rG9be8f8b34d9b: [sanitizer] Simplify GetTls with dl_iterate_phdr.

Hi @MaskRay,

I saw that the patch, along with the temporary workaround for clang-ppc64le-linux has been reverted. I also saw that you committed https://reviews.llvm.org/rGec575e3b0a462ff7a3d23d0f39a22147606050de without a work around for PPC, although that has also been reverted at this time.
Was your recent patch still problematic for PPC and would you still like us to investigate it?

Tue, Apr 6, 10:45 AM

Mon, Apr 5

MaskRay added inline comments to D99901: [Driver][test] Test intended target only.
Mon, Apr 5, 11:01 PM · Restricted Project
MaskRay added a comment to D99887: [lld][WebAssembly] Add `--export-if-defined`.

I don't know wasm enough... In ELF, --export-dynamic-symbol only affects defined symbols. --export-dynamic affects all defined symbols. They don't have effect on other symbols.

Mon, Apr 5, 2:15 PM · Restricted Project
MaskRay committed rW08a17e1c4d0d: Update Buildbot link (authored by MaskRay).
Update Buildbot link
Mon, Apr 5, 1:41 PM

Sun, Apr 4

MaskRay abandoned D93972: [sanizier] Implement GetTls on musl.

Superseded by D99871

Sun, Apr 4, 9:15 PM · Restricted Project
MaskRay requested review of D99871: [sanitizer] Use dl_iterate_phdr based GetTls on musl and FreeBSD.
Sun, Apr 4, 8:59 PM · Restricted Project
MaskRay committed rGec575e3b0a46: [sanitizer] Simplify GetTls with dl_iterate_phdr on Linux (authored by MaskRay).
[sanitizer] Simplify GetTls with dl_iterate_phdr on Linux
Sun, Apr 4, 3:36 PM
MaskRay closed D98926: [sanitizer] Simplify GetTls with dl_iterate_phdr on Linux and use it on musl/FreeBSD.
Sun, Apr 4, 3:36 PM · Restricted Project
MaskRay added a comment to D99286: [AsmParser][SystemZ][z/OS] Add in support to allow use of additional comment strings..

If the C and BCPL style comments don't cause conflict with HLASM, I'd rather we don't add any code. We don't necessarily reject syntax which are unlikely used incorrectly by the user.

They do cause "conflict". HLASM currently does not treat the additional comment strings as "comments".

Sun, Apr 4, 11:45 AM · Restricted Project
MaskRay committed rGe92d2b80c6c9: [Driver] Detect libstdc++ include paths for native gcc (-m32 and -m64) on… (authored by MaskRay).
[Driver] Detect libstdc++ include paths for native gcc (-m32 and -m64) on…
Sun, Apr 4, 10:15 AM
MaskRay closed D99852: [Driver] Detect libstdc++ include paths for native gcc (-m32 and -m64) on Debian i386.
Sun, Apr 4, 10:15 AM · Restricted Project
MaskRay added a comment to D99286: [AsmParser][SystemZ][z/OS] Add in support to allow use of additional comment strings..

If the C and BCPL style comments don't cause conflict with HLASM, I'd rather we don't add any code. We don't necessarily reject syntax which are unlikely used incorrectly by the user.
If such distinction is really needed, maybe name the variable with a positive meaning, e.g. AllowCCommentMarker, instead of Only* (Disallow*).

Sun, Apr 4, 1:09 AM · Restricted Project
MaskRay added a comment to D99852: [Driver] Detect libstdc++ include paths for native gcc (-m32 and -m64) on Debian i386.

From an upstream multiarch build of gcc, the libstdc++ search paths are

/tmp/opt/gcc-debug/lib/gcc/x86_64-pc-linux-gnu/11.0.1/../../../../include/c++/11.0.1
/tmp/opt/gcc-debug/lib/gcc/x86_64-pc-linux-gnu/11.0.1/../../../../include/c++/11.0.1/x86_64-pc-linux-gnu
/tmp/opt/gcc-debug/lib/gcc/x86_64-pc-linux-gnu/11.0.1/../../../../include/c++/11.0.1/backward

(this is similar to cross gcc on Debian)

Sun, Apr 4, 12:18 AM · Restricted Project

Sat, Apr 3

MaskRay updated the diff for D99852: [Driver] Detect libstdc++ include paths for native gcc (-m32 and -m64) on Debian i386.

git add two .keep files

Sat, Apr 3, 9:54 PM · Restricted Project
MaskRay requested review of D99852: [Driver] Detect libstdc++ include paths for native gcc (-m32 and -m64) on Debian i386.
Sat, Apr 3, 9:28 PM · Restricted Project
MaskRay added a comment to rG13a633b438b6: [gcov] Delete CC1 option -coverage-no-function-names-in-data.

Thanks for taking the time to reply

To reproduce:

sudo debootstrap --arch i386 buster buster.i386  
sudo mount -t proc /proc buster.i386/proc
sudo chroot buster.i386 
cd /root/
dget -x https://llvm-jenkins.debian.net/view/Debian%2010%20-%20Buster/job/llvm-toolchain-buster-source/lastSuccessfulBuild/artifact/llvm-toolchain-snapshot_13%7E++20210403102610+b32e76c6d507-1%7Eexp1%7E20210403203324.1412.dsc
dpkg-source -x llvm-toolchain-snapshot_13%7E++20210403102610+b32e76c6d507-1%7Eexp1%7E20210403203324.1412.dsc
cd llvm-toolchain-*
dpkg-buildpackage -nc -b
(install the missing deps)

Full log:
https://llvm-jenkins.debian.net/view/Debian%2010%20-%20Buster/job/llvm-toolchain-buster-binaries/1211/architecture=i386,distribution=buster/console

Will fail with

-- Looking for __atomic_fetch_add_4 in atomic - found
-- Performing Test HAVE_CXX_ATOMICS_WITH_LIB
-- Performing Test HAVE_CXX_ATOMICS_WITH_LIB - Failed
CMake Error at cmake/modules/CheckAtomic.cmake:56 (message):
  Host compiler must support std::atomic!
Call Stack (most recent call first):
  cmake/config-ix.cmake:367 (include)
  CMakeLists.txt:670 (include)

Which is actually just the missing header.
Seems that
/usr/lib/gcc/i686-linux-gnu/8/../../../../include/i386-linux-gnu/c++/8/64
was missing
(I agree that the path isn't ideal but Debian has 20 years history behind it and many of us are not paid for this ...)

Sat, Apr 3, 7:37 PM
MaskRay updated the diff for D98926: [sanitizer] Simplify GetTls with dl_iterate_phdr on Linux and use it on musl/FreeBSD.

Fix Ubuntu 16.04 glibc 2.23

Sat, Apr 3, 4:56 PM · Restricted Project
MaskRay reopened D98926: [sanitizer] Simplify GetTls with dl_iterate_phdr on Linux and use it on musl/FreeBSD.
Sat, Apr 3, 4:51 PM · Restricted Project
MaskRay added a comment to rG13a633b438b6: [gcov] Delete CC1 option -coverage-no-function-names-in-data.

That said, I think most stuff has been done with gcov. So new development may be rare.

sure but PLEASE ASK FOR REVIEW for others changes...
Looking at
https://reviews.llvm.org/rG0361e649759f90046f8f261365df488dc6f68342
https://reviews.llvm.org/rG7c5222e4d1a3a14f029e5f614c9aefd0fa505f1e
https://reviews.llvm.org/rGbfbfd83f147f0e02e652f3ae2635dd834c2e6b46
https://reviews.llvm.org/rG35dd6470de847636c212d7e0cd4d7ac2995679cc

and not listed here:
https://reviews.llvm.org/people/revisions/14377/

You recent changes haven't been reviewed and are breaking clang on i386... Making packages on apt.llvm.org broken...
https://bugs.llvm.org/show_bug.cgi?id=49827

Next time, I will have to escalate your permission abuse...
https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access

Sat, Apr 3, 2:16 PM

Fri, Apr 2

MaskRay added a comment to D98926: [sanitizer] Simplify GetTls with dl_iterate_phdr on Linux and use it on musl/FreeBSD.

After this change, we're also seeing a leak being reported in BoringSSL when running on Debian 9 (stretch) which appears to be a false positive, see fxbug.dev/73487 for more details.

Fri, Apr 2, 5:55 PM · Restricted Project
MaskRay committed rGc318746345cc: [lld-macho] Fix -Wsuggest-override after D99633. NFC (authored by MaskRay).
[lld-macho] Fix -Wsuggest-override after D99633. NFC
Fri, Apr 2, 5:04 PM
MaskRay updated the summary of D99816: [sanitizer] GetTls: Work around Ubuntu 16.04 broken glibc.
Fri, Apr 2, 2:50 PM · Restricted Project
MaskRay requested review of D99816: [sanitizer] GetTls: Work around Ubuntu 16.04 broken glibc.
Fri, Apr 2, 2:16 PM · Restricted Project
MaskRay added a comment to D89013: [libcxx] Support per-target __config_site in per-target runtime build.

This layout matches the layout use by other compilers like GCC.

Fri, Apr 2, 12:41 PM · Restricted Project, Restricted Project
MaskRay added inline comments to D98306: [ELF] Support . and $ in symbol names in expressions.
Fri, Apr 2, 12:06 PM · Restricted Project
MaskRay committed rG8e5f3d04f269: [SLPVectorizer] Fix divide-by-zero after D99719 (authored by MaskRay).
[SLPVectorizer] Fix divide-by-zero after D99719
Fri, Apr 2, 11:14 AM
MaskRay added inline comments to D99719: [SLP] Better estimate cost of no-op extracts on target vectors..
Fri, Apr 2, 10:53 AM · Restricted Project
MaskRay added inline comments to D99719: [SLP] Better estimate cost of no-op extracts on target vectors..
Fri, Apr 2, 10:44 AM · Restricted Project
MaskRay added inline comments to D98856: Always emit error for wrong interfaces to scalable vectors, unless cmdline flag is passed..
Fri, Apr 2, 10:42 AM · Restricted Project, Restricted Project
MaskRay added a comment to rG412fc74140c0: [InstCombine] fold not+or+neg.
Fri, Apr 2, 10:30 AM

Thu, Apr 1

MaskRay accepted D99770: [OpenMP, test] Fix uses of undef S*VAR FileCheck var.
Thu, Apr 1, 3:06 PM · Restricted Project
MaskRay added a comment to D99707: Remove "Rewrite Symbols" from codegen pipeline.

I think people who need symbol rename are mostly using #pragma redefine_extname or asm labels... (others are using objcopy --redefine-sym/--redefine-syms)

Thu, Apr 1, 2:54 PM · Restricted Project
MaskRay accepted D99426: [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text.
/// The file should be opened in text mode on platforms like z/OS that make
/// this distinction.
OF_Text = 1,
F_Text = 1, // For compatibility

/// The file should use a carriage linefeed '\r\n'.
/// Only makes a difference on windows.
OF_CRLF = 2,

/// The file should be opened in text mode and use a carriage linefeed '\r\n'
/// on platforms that make this distinction.
OF_TextWithCRLF = OF_Text | OF_CRLF,

OF_TextWithCRLF needs to say what platforms make a difference.

Can you mention in the description for Windows and z/OS, how these flags make a difference, and how developers should use these flags for portability?
It's still a bit unclear to me.

e.g. when I need to use OF_CRLR instead of OF_Text?

So developers should use either the OF_Text or OF_TextWithCRLF for text files and OF_None for binary files. If the developer doesn't want carriage returns on Windows, they should use OF_Text, if they do want carriage returns on Windows, they should use OF_TextWithCRLF.

So this is the behaviour per platform with my patch:

z/OS:
OF_None: open in binary mode
OF_Text : open in text mode
OF_TextWithCRLF: open in text mode

Windows:
OF_None: open file with no carriage return
OF_Text: open file with no carriage return
OF_TextWithCRLF: open file with carriage return

This is the old behaviour for comparison:
z/OS:
OF_None: open in binary mode
OF_Text: open in text mode

Windows:
OF_None: open file with no carriage return
OF_Text: open file with carriage return

Thu, Apr 1, 2:49 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
MaskRay added a comment to D99556: Add support to -Wa,--version in clang.

In the future, please include Differential Revision: for relands so that the Commits line displays the associated commits :)

Thu, Apr 1, 2:41 PM · Restricted Project
MaskRay committed rG6fe7de90b9e4: [Driver] -nostdinc -nostdinc++: don't warn for -Wunused-command-line-argument (authored by MaskRay).
[Driver] -nostdinc -nostdinc++: don't warn for -Wunused-command-line-argument
Thu, Apr 1, 2:37 PM
MaskRay added a comment to D99426: [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text.
/// The file should be opened in text mode on platforms like z/OS that make
/// this distinction.
OF_Text = 1,
F_Text = 1, // For compatibility
Thu, Apr 1, 11:49 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
MaskRay added a comment to D99556: Add support to -Wa,--version in clang.

We can probably remove the -fno-integraetd-as case.

Or split it out into a separate test file with // REQUIRES: linux. Either actually is fine by me.

Thu, Apr 1, 10:09 AM · Restricted Project

Wed, Mar 31

MaskRay accepted D52050: [Driver] Fix architecture triplets and search paths for Linux x32.
Wed, Mar 31, 6:19 PM · Restricted Project
MaskRay added a comment to D52050: [Driver] Fix architecture triplets and search paths for Linux x32.

Mostly looks good.

Wed, Mar 31, 1:58 PM · Restricted Project
MaskRay updated subscribers of D89013: [libcxx] Support per-target __config_site in per-target runtime build.
Wed, Mar 31, 1:05 PM · Restricted Project, Restricted Project
MaskRay added a comment to D89013: [libcxx] Support per-target __config_site in per-target runtime build.

Regarding

/usr/include/x86_64-unknown-linux-gnu/c++/v1
/usr/include/c++/v1

With GCC multiarch, some include search paths are preceded by machine-os-env specific suffix directories.
Note: 'vendor' is not there. So you may see .../include/x86_64-linux-gnu but there is no .../include/x86_64-{pc,unknown}-linux-gnu

/usr/local/include/x86_64-linux-gnu         # affected by sysroot, multiarch, usually nonexistent
/usr/local/include                          # affected by sysroot
/tmp/opt/gcc-debug/include
/tmp/opt/gcc-debug/lib/gcc/x86_64-pc-linux-gnu/11.0.1/include-fixed
/tmp/opt/gcc-debug/lib/gcc/x86_64-pc-linux-gnu/11.0.1/../../../../x86_64-pc-linux-gnu/include
/usr/include/x86_64-linux-gnu               # affected by sysroot, multiarch
/usr/include                                # affected by sysroot

On Debian x86_64, /usr/include/x86_64-linux-gnu/ exists. Adding x86_64-pc-linux-gnu (an possible value of LLVM_DEFAULT_TARGET_TRIPLE) may add more confusion.

This was already discussed pretty extensively in the past, but I'll try to give a summary.

In the case of GCC, compiler can only compile binaries for a single target that's set at configuration time. For example if you configured GCC with --target=x86_64-acme-linux-gnu, the build links the binary as x86_64-acme-linux-gnu-gcc and that binary would look for headers in /usr/include/x86_64-acme-linux-gnu and libraries in /usr/lib/x86_64-acme-linux-gnu (among other paths) so there's little ambiguity.

Wed, Mar 31, 1:01 PM · Restricted Project, Restricted Project
MaskRay accepted D99552: [openmp][ELF] Recognize LLVM OpenMP offload specific notes.
Wed, Mar 31, 11:54 AM · Restricted Project
MaskRay added a comment to D98508: Restore lit feature object-emission.

There are other targets which don't support/use integrated assembler but they are not host targets, so that is fine.
Now you want to run XCore as something similar like a host target and exercise these tests, I think it is reasonable to add more requirement like supporting integrated assembler.
Otherwise new tests may be developed with subsequent fixups that add REQUIRES: object-emission. That is certainly a maintenance burden.

Wed, Mar 31, 10:53 AM · Restricted Project
MaskRay added inline comments to D52050: [Driver] Fix architecture triplets and search paths for Linux x32.
Wed, Mar 31, 12:50 AM · Restricted Project
MaskRay added inline comments to D52050: [Driver] Fix architecture triplets and search paths for Linux x32.
Wed, Mar 31, 12:28 AM · Restricted Project

Tue, Mar 30

MaskRay added inline comments to D99487: [CodeGen] Port basic block sections from ELF to COFF.
Tue, Mar 30, 11:00 PM · Restricted Project
MaskRay accepted D99549: [LoopVectorize] Use SetVector to track uniform uses to prevent non-determinism..

Looks great!

Tue, Mar 30, 10:50 PM · Restricted Project
MaskRay requested changes to D99625: llvm/cmake/config.guess: update to current version.

Interesting, did not know the difference. There are other GPL 3 config.guess in llvm-project. But license issues should ... always be taken prudently, so may deserve a discussion on llvm-dev.

Tue, Mar 30, 7:53 PM · Restricted Project
MaskRay added a comment to D89013: [libcxx] Support per-target __config_site in per-target runtime build.

With GCC multiarch, some include search paths are preceded by machine-os-env specific suffix directories.
Note: 'vendor' is not there. So you may see .../include/x86_64-linux-gnu but there is no .../include/x86_64-{pc,unknown}-linux-gnu

/usr/local/include/x86_64-linux-gnu         # affected by sysroot, multiarch, usually nonexistent
/usr/local/include                          # affected by sysroot
/tmp/opt/gcc-debug/include
/tmp/opt/gcc-debug/lib/gcc/x86_64-pc-linux-gnu/11.0.1/include-fixed
/tmp/opt/gcc-debug/lib/gcc/x86_64-pc-linux-gnu/11.0.1/../../../../x86_64-pc-linux-gnu/include
/usr/include/x86_64-linux-gnu               # affected by sysroot, multiarch
/usr/include                                # affected by sysroot
Tue, Mar 30, 7:46 PM · Restricted Project, Restricted Project
MaskRay committed rGd332bbee45b5: [Utils][Emacs] Improve syntax highlight (authored by condy).
[Utils][Emacs] Improve syntax highlight
Tue, Mar 30, 7:32 PM
MaskRay closed D99404: [Utils][Emacs] Improve syntax highlight.
Tue, Mar 30, 7:32 PM · Restricted Project