Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quadratic compile time due to llvm::SpillPlacement::addLinks #68

Closed
ramosian-glider opened this issue Aug 31, 2015 · 2 comments
Closed

Comments

@ramosian-glider
Copy link
Member

Originally reported on Google Code with ID 68

large protobufs (http://code.google.com/p/protobuf/) cause very slow compile time 
with clang -O2 -faddress-sanitizer. 

Repro: 
#!/bin/bash                                                                       



cat <<EOF
message Person {
  required string name = 1;
  required int32 id = 2;        // Unique ID number for this person.
  optional string email = 3;
EOF

for((i=4;i<$1; i++)); do
  echo "  optional string s$i = $i;"
done

cat << EOF
}
EOF


for size in 250 500 1000; do ./zzz.sh $size > zzz.proto ; ./src/protoc --cpp_out=z
zzz.proto ; clang -E -O2 z/*.cc -Iz -Isrc -o $size.cc; time clang -c -O2 $size.cc -faddress-sanitizer;
 done 
TIME: real: 16.805; user: 16.630; system: 0.130
TIME: real: 65.340; user: 64.760; system: 0.400
TIME: real: 294.377; user: 292.620; system: 1.020

Profile: 
    41.17% llvm::SpillPlacement::addLinks(llvm::ArrayRef<unsigned int>)
     3.49% llvm::LiveInterval::extendIntervalEndTo(llvm::LiveRange*, llvm::SlotIndex)

Reported by konstantin.s.serebryany on 2012-04-25 13:53:02


- _Attachment: [1000.cc](https://storage.googleapis.com/google-code-attachments/address-sanitizer/issue-68/comment-0/1000.cc)_
@ramosian-glider
Copy link
Member Author

Reported by konstantin.s.serebryany on 2012-04-25 13:56:05

@ramosian-glider
Copy link
Member Author

Adding Project:AddressSanitizer as part of GitHub migration.

Reported by ramosian.glider on 2015-07-30 09:12:59

  • Labels added: ProjectAddressSanitizer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant