This is an archive of the discontinued LLVM Phabricator instance.

[zorg] Cleanup unnecessary options for ARM and AArch64 bots
ClosedPublic

Authored by maxim-kuvyrkov on Feb 9 2018, 3:42 AM.

Details

Summary

"jobs=" settings are inheritted from slave configuration.

"-DCMAKE_C_FLAGS=" and "-DCMAKE_CXX_FLAGS=" for single-stage builds
are passed only to system compiler and don't affect behavior or results.
For two-stage bots (useTwoStage=True) these flags are preserved.

"-DLLVM_LIT_ARGS='-sv -j2'" flags are extraneous, testsuite runs fine
with default parallelism. We preserve "-DLLVM_PARALLEL_LINK_JOBS=2" for
linaro-tk1-* bots, which have only 2GB of RAM.

Diff Detail

Repository
rL LLVM

Event Timeline

maxim-kuvyrkov created this revision.Feb 9 2018, 3:42 AM
rengolin added inline comments.Feb 9 2018, 6:41 AM
buildbot/osuosl/master/config/builders.py
248 ↗(On Diff #133579)

You want to keep the -sv as that should very important information about the tests that failed.

287 ↗(On Diff #133579)

You're not changing it for LNT, better to do that for both.

I'd also try mcup=native instead...

326 ↗(On Diff #133579)

@rovka is this still necessary? Isn't that the default for O0?

Also, mcpu changes. All or nothing.

998 ↗(On Diff #133579)

Are the others being set correctly? They weren't when I did this.

1290 ↗(On Diff #133579)

why disabling marm/mthumb here?

rovka added inline comments.Feb 9 2018, 6:50 AM
buildbot/osuosl/master/config/builders.py
326 ↗(On Diff #133579)

Nope, we should only need -O0 now.

maxim-kuvyrkov added inline comments.Feb 9 2018, 8:29 AM
buildbot/osuosl/master/config/builders.py
248 ↗(On Diff #133579)

"-sv" are default LLVM_LIT_ARGS set in CMakeLists.txt.

287 ↗(On Diff #133579)

You're not changing it for LNT, better to do that for both.

What do you mean? There is no aarch64 LNT bot [yet].

I'd also try mcup=native instead...

Yeah, I plan to switch bots (or add extra variants of bots) for -mcpu=native. That's gonna be a future change.

326 ↗(On Diff #133579)

Will fix.

998 ↗(On Diff #133579)

I don't follow:
"others" == ???
"They" == ???
Please elaborate :-)

1290 ↗(On Diff #133579)

This is a single-stage build, so CMAKE_C_FLAGS and CMAKE_CXX_FLAGS are passed only to host compiler. AFAICT, they do not affect results of libcxx testsuites.

All of the thumb/arm changes I think shouldn't be removed. The main thing is that we can know that stage 1 clang can be compiled as arm/thumb and it runs on all the tests without failure.

buildbot/osuosl/master/config/builders.py
248 ↗(On Diff #133579)

Ah,must be a new thing, then. :)

287 ↗(On Diff #133579)

I meant testsuite (using LNT), if you look at the line above you'll see what I mean. :)

998 ↗(On Diff #133579)

Well, you're deleting C_FLAGS & CXX_FLAGS which didn't use to be set from COMPILER_RT_FLAGS. Unless they are, this will make Clang not compile with ARM/Thumb + VFP, which is important to make sure Clang works on both Arm and Thumb when running the tests. The VFP test is a bit bogus because our boards have NEON...

1290 ↗(On Diff #133579)

The host compiler will compile libcxx with arm/thumb and therefore generate different library code, no? Same for test code.

maxim-kuvyrkov added inline comments.Feb 13 2018, 8:11 AM
buildbot/osuosl/master/config/builders.py
287 ↗(On Diff #133579)

My logic is as follows, let me know if there are mistakes in it:
<cut>
The intention of this bot is to run testsuite on a code path for a popular CPU -- cortex-a57. To achieve this we do a single-stage build of llvm with system compiler (we don't care what tuning system compiler uses as long as ISA is compatible with current CPU), and then build testsuite with stage1 llvm. We care about exercising -mcpu=cortex-a57 code path in llvm, so we add these flags to testsuite.
</cut>

If the above is correct then this change is NFC, which is what I intended it to be.

Now, regarding setting -mcpu=, -mthumb/-marm and other architecture options.
It appears that a cleaner solution would be setting LLVM_TARGET_TRIPLE and/or other configuration options at cmake stage. Make LLVM generate cortex-a57 (or cortex-a15, ...) code by default and stop bothering about flags. WDYT?

998 ↗(On Diff #133579)

Same logic (and, same assumptions) about CMAKE_C_FLAGS / CMAKE_CXX_FLAGS apply here.

1290 ↗(On Diff #133579)

Yes and no. Library and test code will be different bit-wise, but (unless there are "#ifdef arm / #ifdef thumb" !) should be semantically equivalent.
If there are indeed different code paths for ARM / Thumb modes or other architectural features, then, "yes", we should differentiate here.

rengolin added inline comments.Feb 13 2018, 8:48 AM
buildbot/osuosl/master/config/builders.py
287 ↗(On Diff #133579)

Right, this is the test-suite, your assumptions are correct.

1290 ↗(On Diff #133579)

I don't know, but I wouldn't assume so. I think we can leave that change for a different patch, after asking the libc++ folks.

maxim-kuvyrkov accepted this revision.Feb 16 2018, 3:59 AM

I'll amend libcxx and global-isel builders per comments in the final commit. Changes for all other bots seem to be OK.

buildbot/osuosl/master/config/builders.py
1290 ↗(On Diff #133579)

OK, sounds good.

This revision is now accepted and ready to land.Feb 16 2018, 3:59 AM
This revision was automatically updated to reflect the committed changes.